All checks were successful
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 2m30s
Test / Hakurei (push) Successful in 3m40s
Test / ShareFS (push) Successful in 3m48s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 5m54s
Test / Flake checks (push) Successful in 1m28s
This proof-of-concept was abandoned long ago. Its test suite is flaky, heavy on I/O and does not increase test coverage. This change fully removes hpkg and supporting code. Signed-off-by: Ophestra <cat@gensokyo.uk>
32 lines
994 B
Bash
Executable File
32 lines
994 B
Bash
Executable File
#!/bin/sh -e
|
|
cd "$(dirname -- "$0")/.."
|
|
VERSION="${HAKUREI_VERSION:-untagged}"
|
|
pname="hakurei-${VERSION}-$(go env GOARCH)"
|
|
out="${DESTDIR:-dist}/${pname}"
|
|
|
|
echo '# Preparing distribution files.'
|
|
mkdir -p "${out}"
|
|
cp -v "README.md" "dist/hsurc.default" "dist/install.sh" "${out}"
|
|
cp -rv "dist/comp" "${out}"
|
|
echo
|
|
|
|
echo '# Building hakurei.'
|
|
go generate ./...
|
|
go build -trimpath -v -o "${out}/bin/" -ldflags "-s -w
|
|
-buildid= -linkmode external -extldflags=-static
|
|
-X hakurei.app/internal/info.buildVersion=${VERSION}
|
|
-X hakurei.app/internal/info.hakureiPath=/usr/bin/hakurei
|
|
-X hakurei.app/internal/info.hsuPath=/usr/bin/hsu
|
|
-X main.hakureiPath=/usr/bin/hakurei" ./...
|
|
echo
|
|
|
|
echo '# Testing hakurei.'
|
|
go test -ldflags='-buildid= -linkmode external -extldflags=-static' ./...
|
|
echo
|
|
|
|
echo '# Creating distribution.'
|
|
rm -f "${out}.tar.gz" && tar -C "${out}/.." -vczf "${out}.tar.gz" "${pname}"
|
|
rm -rf "${out}"
|
|
(cd "${out}/.." && sha512sum "${pname}.tar.gz" > "${pname}.tar.gz.sha512")
|
|
echo
|