Skip to content

Commit ad77b85

Browse files
committed
Use working aptly version 1.5.0
aptly version 1.6.0 results in an segmentation fault. Therefore we fall back to version 1.5.0. Since it is not possible to specify a version via brew command a formula was added for aptly 1.5.0 (source: https://github.com/Homebrew/homebrew-core/pull/202415/files) Signed-off-by: Alexander Dahmen <[email protected]>
1 parent c5b3de6 commit ad77b85

File tree

3 files changed

+84
-12
lines changed

3 files changed

+84
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,47 @@ env:
88
jobs:
99
main:
1010
name: CI
11-
runs-on: ubuntu-latest
11+
runs-on: macOS-latest
12+
env:
13+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
14+
# Needed to publish new packages to our S3-hosted APT repo
15+
AWS_ACCESS_KEY_ID: ${{ secrets.OBJECT_STORAGE_ACCESS_KEY_ID }}
16+
AWS_SECRET_ACCESS_KEY: ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
1217
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
- name: Build
16-
uses: ./.github/actions/build
18+
- uses: actions/checkout@v4
1719
with:
18-
go-version: ${{ env.GO_VERSION }}
19-
- name: Lint
20-
run: make lint
21-
- name: Test
22-
run: make test
20+
# Allow goreleaser to access older tag information.
21+
fetch-depth: 0
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version-file: "go.mod"
25+
cache: true
26+
- name: Import GPG key
27+
uses: crazy-max/ghaction-import-gpg@v6
28+
id: import_gpg
29+
with:
30+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
31+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
32+
- name: Set up keychain
33+
run: |
34+
echo -n $SIGNING_CERTIFICATE_BASE64 | base64 -d -o ./ApplicationID.p12
35+
KEYCHAIN_PATH=$RUNNER_TEMP/ios_signing_temp.keychain-db
36+
security create-keychain -p "${{ secrets.TEMP_KEYCHAIN }}" $KEYCHAIN_PATH
37+
security default-keychain -s $KEYCHAIN_PATH
38+
security unlock-keychain -p "${{ secrets.TEMP_KEYCHAIN }}" $KEYCHAIN_PATH
39+
security import ./ApplicationID.p12 -P "${{ secrets.APPLICATION_ID }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
40+
security list-keychain -d user -s $KEYCHAIN_PATH
41+
echo -n $AUTHKEY_BASE64 | base64 -d -o ./AuthKey.p8
42+
xcrun notarytool store-credentials stackit-cli -i $APPLE_ISSUER -d $APPLE_KEY_ID -k AuthKey.p8 --keychain $KEYCHAIN_PATH
43+
rm ./ApplicationID.p12
44+
rm ./AuthKey.p8
45+
env:
46+
APPLE_ISSUER: ${{ secrets.APPLE_ISSUER }}
47+
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
48+
SIGNING_CERTIFICATE_BASE64: ${{ secrets.APPLICATION_ID_CERT }}
49+
AUTHKEY_BASE64: ${{ secrets.APPLE_API_KEY }}
50+
- name: Install Aptly
51+
run: |
52+
brew help
53+
brew install aptly.rb
54+
aptly version

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ jobs:
5757
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
5858
SIGNING_CERTIFICATE_BASE64: ${{ secrets.APPLICATION_ID_CERT }}
5959
AUTHKEY_BASE64: ${{ secrets.APPLE_API_KEY }}
60-
- name: Install Aptly
61-
run: brew install aptly
60+
- name: Install Aptly version 1.5.0
61+
run: brew install aptly.rb
6262
- name: Install Snapcraft
6363
uses: samuelmeuli/action-snapcraft@v2
6464
- name: Run GoReleaser

aptly.rb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
class Aptly < Formula
2+
desc "Swiss army knife for Debian repository management"
3+
homepage "https://www.aptly.info/"
4+
url "https://github.com/aptly-dev/aptly/archive/refs/tags/v1.5.0.tar.gz"
5+
sha256 "07e18ce606feb8c86a1f79f7f5dd724079ac27196faa61a2cefa5b599bbb5bb1"
6+
license "MIT"
7+
head "https://github.com/aptly-dev/aptly.git", branch: "master"
8+
9+
bottle do
10+
rebuild 2
11+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "f689184731329b1c22f23af361e31cd8aa6992084434d49281227654281a8f45"
12+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "0d022b595e520ea53e23b1dfceb4a45139e7e2ba735994196135c1f9c1a36d4c"
13+
sha256 cellar: :any_skip_relocation, arm64_ventura: "c6fa91fb368a63d5558b8c287b330845e04f90bd4fe7223e161493b01747c869"
14+
sha256 cellar: :any_skip_relocation, arm64_monterey: "19c0c8c0b35c1c5faa2a71fc0bd088725f5623f465369dcca5b2cea59322714c"
15+
sha256 cellar: :any_skip_relocation, arm64_big_sur: "2314abe4aae7ea53660920d311cacccd168045994e1a9eddf12a381b215c1908"
16+
sha256 cellar: :any_skip_relocation, sonoma: "0f077e265538e235ad867b39edc756180c8a0fba7ac5385ab59b18e827519f4c"
17+
sha256 cellar: :any_skip_relocation, ventura: "d132d06243b93952309f3fbe1970d87cde272ea103cf1829c880c1b8a85a12cb"
18+
sha256 cellar: :any_skip_relocation, monterey: "86111a102d0782a77bab0d48015bd275f120a36964d86f8f613f1a8f73d94664"
19+
sha256 cellar: :any_skip_relocation, big_sur: "d622cfe1d925f0058f583b8bf48b0bdcee36a441f1bcf145040e5f93879f8765"
20+
sha256 cellar: :any_skip_relocation, catalina: "5d9d495ec8215cfade3e856528dfa233496849517813b19a9ba8d60cb72c4751"
21+
sha256 cellar: :any_skip_relocation, x86_64_linux: "bbff5503f74ef5dcaae33846e285ecf1a23c23de1c858760ae1789ef6fc99524"
22+
end
23+
24+
depends_on "go" => :build
25+
26+
def install
27+
system "go", "generate" if build.head?
28+
system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}")
29+
30+
bash_completion.install "completion.d/aptly"
31+
end
32+
33+
test do
34+
assert_match "aptly version:", shell_output("#{bin}/aptly version")
35+
36+
(testpath/".aptly.conf").write("{}")
37+
result = shell_output("#{bin}/aptly -config='#{testpath}/.aptly.conf' mirror list")
38+
assert_match "No mirrors found, create one with", result
39+
end
40+
end

0 commit comments

Comments
 (0)