mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
build-aci: Add multi arch support
Uses GOARCH to build for a targeted arch. Usage: GOARCH=... BINARYDIR=... BUILDDIR=... ./scripts/build-aci version Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
fb6287240f
commit
8309ca92d7
@ -11,6 +11,13 @@ ACBUILD=${ACBUILD:-acbuild}
|
||||
|
||||
VERSION=$1
|
||||
|
||||
go2aci() {
|
||||
case "${1}" in
|
||||
"arm64") echo "aarch64";;
|
||||
*) echo "${1}";;
|
||||
esac
|
||||
}
|
||||
|
||||
if ! command -v $ACBUILD >/dev/null; then
|
||||
echo "acbuild ($ACBUILD) is not executable"
|
||||
exit 1
|
||||
@ -63,6 +70,8 @@ acbuild --debug port add peer tcp 2380
|
||||
|
||||
acbuild --debug copy "$TMPHOSTS" /etc/hosts
|
||||
|
||||
acbuild --debug label add arch $(go2aci ${GOARCH})
|
||||
|
||||
# mkdir default data-dir
|
||||
mkdir -p .acbuild/currentaci/rootfs/var/lib/etcd
|
||||
|
||||
@ -70,4 +79,4 @@ mkdir -p .acbuild/currentaci/rootfs/var/lib/etcd
|
||||
ln -s ./usr/local/bin/etcd .acbuild/currentaci/rootfs/etcd
|
||||
ln -s ./usr/local/bin/etcdctl .acbuild/currentaci/rootfs/etcdctl
|
||||
|
||||
acbuild --debug write --overwrite $BUILDDIR/etcd-${1}-linux-amd64.aci
|
||||
acbuild --debug write --overwrite $BUILDDIR/etcd-${1}-linux-${GOARCH}.aci
|
||||
|
Loading…
x
Reference in New Issue
Block a user