File: gon.sh

package info (click to toggle)
hcloud-cli 1.39.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,628 kB
  • sloc: sh: 36; makefile: 7
file content (30 lines) | stat: -rwxr-xr-x 588 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

set -eu -o posix

# Only sign on releasing
if [[ "${GITHUB_REF_TYPE:-}" != "tag" ]]; then
  exit 0
fi

BINARY_PATH="$1"

GON_CONFIG="gon_$RANDOM.json"
cleanup() {
  rm -f "$GON_CONFIG"
}
trap cleanup EXIT

printf '{
  "source": ["%s"],
  "bundle_id": "cloud.hetzner.cli",
  "apple_id": {
    "username": "integrations@hetzner-cloud.de",
    "password": "@env:HC_APPLE_DEVELOPER_PASSWORD"
  },
  "sign": {
    "application_identity": "Developer ID Application: Hetzner Cloud GmbH (4PM38G6W5R)"
  }
}' "$BINARY_PATH" > "$GON_CONFIG"

gon -log-level=debug "$GON_CONFIG"