Build Alpine Packages / preflight (push) Successful in 12s
Build Alpine Packages / build (gitea) (push) Successful in 21s
Build Alpine Packages / build (lavinmq) (push) Successful in 2m54s
Build Alpine Packages / build (seaweedfs) (push) Successful in 20m49s
Build Alpine Packages / build (greptimedb) (push) Successful in 1h42m55s
Build Alpine Packages / verify-and-publish (push) Failing after 1m26s
Reviewed-on: #10
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
configs=(admin credential filer master volume notification replication security shell)
|
|
pkgver="$(
|
|
awk -F= '$1 == "pkgver" { print $2; exit }' "${package_dir}/APKBUILD"
|
|
)"
|
|
tmpdir="$(mktemp -d)"
|
|
repo_root="${REPO_ROOT:-$(cd "${package_dir}/../../../.." && pwd)}"
|
|
source_archive="${repo_root}/.cache/apk-distfiles/seaweedfs-${pkgver}-src.tar.gz"
|
|
|
|
cleanup() {
|
|
rm -rf "${tmpdir}"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
if [[ ! -f "${source_archive}" ]]; then
|
|
source_archive="${tmpdir}/seaweedfs-${pkgver}-src.tar.gz"
|
|
curl -fsSL \
|
|
-o "${source_archive}" \
|
|
"https://github.com/seaweedfs/seaweedfs/archive/refs/tags/${pkgver}.tar.gz"
|
|
fi
|
|
tar -xzf "${source_archive}" -C "${tmpdir}"
|
|
source_dir="${tmpdir}/seaweedfs-${pkgver}"
|
|
(
|
|
cd "${source_dir}"
|
|
go build -mod=readonly -buildvcs=false -trimpath -o "${tmpdir}/weed" ./weed
|
|
)
|
|
|
|
for config in "${configs[@]}"; do
|
|
"${tmpdir}/weed" scaffold -config "${config}" 2>/dev/null \
|
|
> "${package_dir}/example-${config}.toml"
|
|
done
|
|
|
|
"${tmpdir}/weed" autocomplete bash 2>/dev/null \
|
|
| sed -E 's#complete -C "?[^"]*/weed"? weed#complete -C /usr/bin/weed weed#' \
|
|
> "${package_dir}/weed.bash-completion"
|