Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da3d7201a1 |
No files matched your search
@@ -44,7 +44,7 @@ jobs:
|
|||||||
# Catches platform-specific breakage before a release is tagged.
|
# Catches platform-specific breakage before a release is tagged.
|
||||||
- name: Every release platform compiles
|
- name: Every release platform compiles
|
||||||
run: |
|
run: |
|
||||||
for t in linux/amd64 linux/arm64 linux/arm windows/amd64 darwin/amd64 darwin/arm64; do
|
for t in linux/amd64 windows/amd64; do
|
||||||
echo "building for $t"
|
echo "building for $t"
|
||||||
GOOS=${t%/*} GOARCH=${t#*/} GOARM=7 CGO_ENABLED=0 go build -o /dev/null ./cmd/hammerhead
|
GOOS=${t%/*} GOARCH=${t#*/} GOARM=7 CGO_ENABLED=0 go build -o /dev/null ./cmd/hammerhead
|
||||||
done
|
done
|
||||||
@@ -59,4 +59,4 @@ jobs:
|
|||||||
*-*) ;; # pre-releases (v1.0.0-rc1) don't move :latest
|
*-*) ;; # pre-releases (v1.0.0-rc1) don't move :latest
|
||||||
*) tags="$tags -t $image:latest" ;;
|
*) tags="$tags -t $image:latest" ;;
|
||||||
esac
|
esac
|
||||||
docker buildx build --platform linux/amd64,linux/arm64 $tags --push .
|
docker buildx build --platform linux/amd64 $tags --push .
|
||||||
@@ -41,7 +41,7 @@ ports. Then open ports on the **Resources** page.
|
|||||||
|
|
||||||
## Deploying
|
## Deploying
|
||||||
|
|
||||||
Releases are built by Gitea Actions. Pushing a tag such as `v0.2.0` runs `.gitea/workflows/release.yml`, which tests the code, builds Hammerhead for Linux (amd64, arm64, armv7), Windows (amd64) and macOS (amd64, arm64), publishes the archives with a `SHA256SUMS` file on the Releases page, and pushes a multi-architecture container image to this server's registry (`git.veillax.com/veillax/hammerhead`). Every push and pull request runs `.gitea/workflows/ci.yml`: formatting, vet, tests, and a check that every release platform still compiles.
|
Releases are built by Gitea Actions. Pushing a tag such as `v0.2.0` runs `.gitea/workflows/release.yml`, which tests the code, builds Hammerhead for Linux (amd64) and Windows (amd64), publishes the archives with a `SHA256SUMS` file on the Releases page, and pushes a container image (linux/amd64) to this server's registry (`git.veillax.com/veillax/hammerhead`). Every push and pull request runs `.gitea/workflows/ci.yml`: formatting, vet, tests, and a check that every release platform still compiles.
|
||||||
|
|
||||||
**Fastest: one script on a fresh VPS**
|
**Fastest: one script on a fresh VPS**
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ sudoedit /etc/hammerhead/hammerhead.env # your settings and secrets
|
|||||||
sudo systemctl start hammerhead
|
sudo systemctl start hammerhead
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `linux_arm64` or `linux_arm` for Raspberry Pi and other ARM machines. To upgrade, repeat the same steps: your settings and data are kept. `sudo ./install.sh --uninstall` removes the service and binary but leaves `/etc/hammerhead` and `/var/lib/hammerhead` alone. `hammerhead -version` tells you which build is running.
|
Releases are published for x86-64 only; for ARM machines build it yourself (`TARGETS=linux/arm64 sh deploy/build.sh`). To upgrade, repeat the same steps: your settings and data are kept. `sudo ./install.sh --uninstall` removes the service and binary but leaves `/etc/hammerhead` and `/var/lib/hammerhead` alone. `hammerhead -version` tells you which build is running.
|
||||||
|
|
||||||
**Updates**
|
**Updates**
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -8,12 +8,13 @@
|
|||||||
# dist/hammerhead_<version>_<os>_<arch>.tar.gz or .zip
|
# dist/hammerhead_<version>_<os>_<arch>.tar.gz or .zip
|
||||||
# dist/SHA256SUMS
|
# dist/SHA256SUMS
|
||||||
#
|
#
|
||||||
# Set TARGETS="linux/amd64 linux/arm64" to build fewer platforms.
|
# Releases are published for linux/amd64 and windows/amd64 only. Set TARGETS="linux/arm64 darwin/arm64"
|
||||||
|
# (any GOOS/GOARCH pair Go supports) to build something else by hand.
|
||||||
set -eu
|
set -eu
|
||||||
NAME=hammerhead
|
NAME=hammerhead
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
VERSION=${1:-$(git describe --tags --always 2>/dev/null || echo dev)}
|
VERSION=${1:-$(git describe --tags --always 2>/dev/null || echo dev)}
|
||||||
TARGETS=${TARGETS:-"linux/amd64 linux/arm64 linux/arm windows/amd64 darwin/amd64 darwin/arm64"}
|
TARGETS=${TARGETS:-"linux/amd64 windows/amd64"}
|
||||||
|
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
mkdir -p dist/bin dist/stage
|
mkdir -p dist/bin dist/stage
|
||||||
|
|||||||
+1
-3
@@ -51,9 +51,7 @@ command -v systemctl > /dev/null 2>&1 || die "this needs a systemd-based Linux (
|
|||||||
|
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
x86_64 | amd64) ARCH=amd64 ;;
|
x86_64 | amd64) ARCH=amd64 ;;
|
||||||
aarch64 | arm64) ARCH=arm64 ;;
|
*) die "releases are published for x86-64 Linux only, not $(uname -m); build it yourself with: TARGETS=linux/arm64 sh deploy/build.sh" ;;
|
||||||
armv7* | armv6* | arm) ARCH=arm ;;
|
|
||||||
*) die "unsupported CPU: $(uname -m)" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
pkg_install() { # installs packages with whichever package manager there is
|
pkg_install() { # installs packages with whichever package manager there is
|
||||||
|
|||||||
Reference in new issue
Block a user