Skip to content

Commit

Permalink
pumb versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacsjep committed Jan 22, 2025
1 parent 39543c3 commit 75b6e69
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ARCH=aarch64
ARG VERSION=1.15
ARG UBUNTU_VERSION=22.04
ARG VERSION=12.2.0
ARG UBUNTU_VERSION=24.04
ARG REPO=axisecp
ARG SDK=acap-native-sdk
FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Files or directories can be excluded from being copied into the container by pre
| `-prune` | Set to true execute 'docker system prune -f' after build. | `false` |
| `-pwd` | The root password for the camera where the EAP application is installed. | `""` |
| `-start` | Set to true to start the application after installation. | `false` |
| `-version` | Set to specifiy the sdk version for the ACAP image like, for example -version 1.12 | |
| `-sdk` | Set to specifiy the sdk version for the ACAP image like, for example -version 1.12 | `12.2.0` |
| `-watch` | Set to true to monitor the package log after building. | `false` |


Expand Down
34 changes: 18 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ func main() {
arch := flag.String("arch", "aarch64", "The architecture for the ACAP application: 'aarch64' or 'armv7hf'.")
doStart := flag.Bool("start", false, "Set to true to start the application after installation.")
createProject := flag.Bool("newapp", false, "Generate a new goxis app.")
sdk_version := flag.String("sdk", "", "The version of the SDK to use. (blank = Version 1.15)")
sdk_version := flag.String("sdk", "", "The version of the SDK to use. (blank = 12.2.0)")
ubunutu_version := flag.String("ubunutu", "", "The Ubunut version to use. (blank = 24.04)")
doInstall := flag.Bool("install", false, "Set to true to install the application on the camera.")
prune := flag.Bool("prune", false, "Set to true execute 'docker system prune -f' after build.")
lowestSdkVersion := flag.Bool("lowsdk", false, "Set to true to build with acap-sdk version 3.5 and ubunutu 20.04")
Expand Down Expand Up @@ -76,21 +77,22 @@ func main() {
}

buildConfig := BuildConfiguration{
AppDirectory: *appDirectory,
Arch: *arch,
Manifest: amf,
ManifestPath: *manifestPath,
Ip: *ip,
Pwd: *pwd,
DoStart: *doStart,
DoInstall: *doInstall,
LowestSdk: *lowestSdkVersion,
Watch: *watch,
Dockerfile: *dockerFile,
FilesToAdd: *filesToAdd,
Prune: *prune,
ImageName: fmt.Sprintf("%s:%s", *arch, amf.ACAPPackageConf.Setup.AppName),
SdkVersion: *sdk_version,
AppDirectory: *appDirectory,
Arch: *arch,
Manifest: amf,
ManifestPath: *manifestPath,
Ip: *ip,
Pwd: *pwd,
DoStart: *doStart,
DoInstall: *doInstall,
LowestSdk: *lowestSdkVersion,
Watch: *watch,
Dockerfile: *dockerFile,
FilesToAdd: *filesToAdd,
Prune: *prune,
ImageName: fmt.Sprintf("%s:%s", *arch, amf.ACAPPackageConf.Setup.AppName),
SdkVersion: *sdk_version,
UbunutVersion: *ubunutu_version,
}
// Configure SDK and architecture for the specific app
configureSdk(*lowestSdkVersion, &buildConfig)
Expand Down
6 changes: 4 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ func configureSdk(lowestSdkVersion bool, buildConfig *BuildConfiguration) {
}
} else {
buildConfig.Sdk = "acap-native-sdk"
buildConfig.UbunutVersion = "22.04"
if buildConfig.UbunutVersion == "" {
buildConfig.UbunutVersion = "24.04"
}
if buildConfig.SdkVersion != "" {
buildConfig.Version = buildConfig.SdkVersion
} else {
buildConfig.Version = "1.14"
buildConfig.Version = "12.2.0"
}
}
fmt.Println("Using SDK:", buildConfig.Sdk)
Expand Down

0 comments on commit 75b6e69

Please sign in to comment.