From 1392529a3f5203477dbd095b030cd763ac233f15 Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" <greg@gregtwallace.com> Date: Tue, 22 Apr 2025 18:27:54 -0400 Subject: [PATCH 1/5] dep: go 1.24.2 --- .github/workflows/build_releases.yml | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 7ef37de..3b7460d 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -8,7 +8,7 @@ on: env: GITHUB_REF: ${{ github.ref }} - GO_VERSION: '1.24.1' + GO_VERSION: '1.24.2' jobs: build-common: diff --git a/go.mod b/go.mod index 3c00d28..2161c8f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module apc-p15-tool -go 1.24.1 +go 1.24.2 require ( github.com/peterbourgon/ff/v4 v4.0.0-alpha.4 From 3bb6b2a3c19452fb348ede80c137b4e82dfc2857 Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" <greg@gregtwallace.com> Date: Tue, 22 Apr 2025 18:27:54 -0400 Subject: [PATCH 2/5] dep: update all --- go.mod | 4 ++-- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 2161c8f..76eb3ca 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ go 1.24.2 require ( github.com/peterbourgon/ff/v4 v4.0.0-alpha.4 github.com/sigurn/crc16 v0.0.0-20240131213347-83fcde1e29d1 - golang.org/x/crypto v0.36.0 + golang.org/x/crypto v0.37.0 ) -require golang.org/x/sys v0.31.0 // indirect +require golang.org/x/sys v0.32.0 // indirect replace apc-p15-tool/cmd/install_only => /cmd/install_only diff --git a/go.sum b/go.sum index 950e8c5..0b94b0b 100644 --- a/go.sum +++ b/go.sum @@ -4,11 +4,11 @@ github.com/peterbourgon/ff/v4 v4.0.0-alpha.4 h1:aiqS8aBlF9PsAKeMddMSfbwp3smONCn3 github.com/peterbourgon/ff/v4 v4.0.0-alpha.4/go.mod h1:H/13DK46DKXy7EaIxPhk2Y0EC8aubKm35nBjBe8AAGc= github.com/sigurn/crc16 v0.0.0-20240131213347-83fcde1e29d1 h1:NVK+OqnavpyFmUiKfUMHrpvbCi2VFoWTrcpI7aDaJ2I= github.com/sigurn/crc16 v0.0.0-20240131213347-83fcde1e29d1/go.mod h1:9/etS5gpQq9BJsJMWg1wpLbfuSnkm8dPF6FdW2JXVhA= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= From 72f3f42baa8b34a7bd4523725569d4919d53112d Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" <greg@gregtwallace.com> Date: Tue, 22 Apr 2025 18:27:54 -0400 Subject: [PATCH 3/5] build: add darwin arm64 & amd64 --- .github/workflows/build_releases.yml | 174 +++++++++++++++++++++++++++ build.ps1 | 22 ++++ 2 files changed, 196 insertions(+) diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 3b7460d..eb1e2ff 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -40,6 +40,8 @@ jobs: name: CHANGELOG.md path: ./CHANGELOG.md +### + build-linux-arm64: runs-on: ubuntu-24.04 steps: @@ -171,6 +173,90 @@ jobs: name: apc-p15-install-windows-amd64 path: ./apc-p15-install.exe + build-darwin-arm64: + runs-on: macos-15 + steps: + - name: Checkout Backend Repo + uses: actions/checkout@v4 + with: + repository: gregtwallace/apc-p15-tool + ref: ${{ env.GITHUB_REF }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '${{ env.GO_VERSION }}' + + - name: Build Tool + run: go build -o ./apc-p15-tool -v ./cmd/tool + env: + GOOS: darwin + GOARCH: arm64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool-darwin-arm64 + path: ./apc-p15-tool + + - name: Build Install Only + run: go build -o ./apc-p15-install -v ./cmd/install_only + env: + GOOS: darwin + GOARCH: arm64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-install-darwin-arm64 + path: ./apc-p15-install + + build-darwin-amd64: + runs-on: macos-13 + steps: + - name: Checkout Backend Repo + uses: actions/checkout@v4 + with: + repository: gregtwallace/apc-p15-tool + ref: ${{ env.GITHUB_REF }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '${{ env.GO_VERSION }}' + + - name: Build Tool + run: go build -o ./apc-p15-tool -v ./cmd/tool + env: + GOOS: darwin + GOARCH: amd64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool-darwin-amd64 + path: ./apc-p15-tool + + - name: Build Install Only + run: go build -o ./apc-p15-install -v ./cmd/install_only + env: + GOOS: darwin + GOARCH: amd64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-install-darwin-amd64 + path: ./apc-p15-install + +### + release-file-linux-arm64: needs: [build-common, build-linux-arm64] runs-on: ubuntu-24.04 @@ -302,3 +388,91 @@ jobs: with: name: apc-p15-tool_windows_amd64 path: ./release + + release-file-darwin-arm64: + needs: [build-common, build-darwin-arm64] + runs-on: ubuntu-24.04 + + steps: + - name: Make release directory + run: mkdir ./release + + - name: Download Tool Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-tool-darwin-arm64 + path: ./release + + - name: Download Install Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-install-darwin-arm64 + path: ./release + + - name: Download README + uses: actions/download-artifact@v4 + with: + name: README.md + path: ./release + + - name: Download LICENSE + uses: actions/download-artifact@v4 + with: + name: LICENSE.md + path: ./release + + - name: Download CHANGELOG + uses: actions/download-artifact@v4 + with: + name: CHANGELOG.md + path: ./release + + - name: Save Release + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool_darwin_arm64 + path: ./release + + release-file-darwin-amd64: + needs: [build-common, build-darwin-amd64] + runs-on: ubuntu-24.04 + + steps: + - name: Make release directory + run: mkdir ./release + + - name: Download Tool Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-tool-darwin-amd64 + path: ./release + + - name: Download Install Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-install-darwin-amd64 + path: ./release + + - name: Download README + uses: actions/download-artifact@v4 + with: + name: README.md + path: ./release + + - name: Download LICENSE + uses: actions/download-artifact@v4 + with: + name: LICENSE.md + path: ./release + + - name: Download CHANGELOG + uses: actions/download-artifact@v4 + with: + name: CHANGELOG.md + path: ./release + + - name: Save Release + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool_darwin_amd64 + path: ./release diff --git a/build.ps1 b/build.ps1 index 7147a33..0c8774b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -34,3 +34,25 @@ $env:GOARCH = "arm64" $env:GOOS = "linux" $env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-install-arm64 ./cmd/install_only + +# Darwin (MacOS) amd64 +$env:GOARCH = "amd64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-tool-darwin-amd64 ./cmd/tool + +$env:GOARCH = "amd64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-install-darwin-amd64 ./cmd/install_only + +# Darwin (MacOS) arm64 +$env:GOARCH = "arm64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-tool-darwin-arm64 ./cmd/tool + +$env:GOARCH = "arm64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-install-darwin-arm64 ./cmd/install_only From 124c06d8be1e21786c5dfcf3d6d3f70cb5430677 Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" <greg@gregtwallace.com> Date: Tue, 22 Apr 2025 18:27:55 -0400 Subject: [PATCH 4/5] build: compile linux/arm64 in native runner --- .github/workflows/build_releases.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index eb1e2ff..5b41dbe 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -43,7 +43,7 @@ jobs: ### build-linux-arm64: - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -52,12 +52,6 @@ jobs: ref: ${{ env.GITHUB_REF }} fetch-depth: 0 - - name: Update apt - run: sudo apt update - - - name: Install cross-compiler for linux/arm64 - run: sudo apt-get -y install gcc-aarch64-linux-gnu - - name: Set up Go uses: actions/setup-go@v5 with: @@ -68,7 +62,6 @@ jobs: env: GOOS: linux GOARCH: arm64 - CC: aarch64-linux-gnu-gcc CGO_ENABLED: 0 - name: Save Compiled Binary From 86feabd9390c26705ec9878be8d55fb67ff7a84a Mon Sep 17 00:00:00 2001 From: "Greg T. Wallace" <greg@gregtwallace.com> Date: Tue, 22 Apr 2025 18:27:55 -0400 Subject: [PATCH 5/5] v1.2.2 --- CHANGELOG.md | 7 +++++++ pkg/app/app.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f99a0f0..cc534a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # APC P15 Tool Changelog +## [v1.2.2] - 2025-04-22 + +All dependencies updated. + +Add darwin arm64 and amd64 builds. + + ## [v1.2.1] - 2025-03-17 Fix time check for UPS when it is set to GMT timezone. diff --git a/pkg/app/app.go b/pkg/app/app.go index 65b21be..052a00e 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -12,7 +12,7 @@ import ( ) const ( - appVersion = "1.2.1" + appVersion = "1.2.2" ) // struct for receivers to use common app pieces