mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 20:57:58 +00:00
* Adding docker image and release scripts * Using circleci version 2 * now building dumb-init and gosu from source * trying to fix e2e tests * fixing working directory for circleci version 2 * start atlantis server and ngrok in the background * Adding terraform to path and removing old decryption method for circleci * adding terraform binary to the correct path * ATLANTIS_URL is now being exported * using circleci version 2 syntax to export variable * using circleci version 2 syntax to export variable * ngrok isnt working now * Updating CHANGELOG * Fixes after review and updated README.md
44 lines
955 B
Bash
Executable File
44 lines
955 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# define architecture we want to build
|
|
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
|
|
XC_OS=${XC_OS:-linux darwin}
|
|
XC_EXCLUDE_OSARCH="!darwin/arm !darwin/386"
|
|
|
|
# clean up
|
|
echo "-> running clean up...."
|
|
rm -rf output/*
|
|
|
|
if ! which gox > /dev/null; then
|
|
echo "-> installing gox..."
|
|
go get -u github.com/mitchellh/gox
|
|
fi
|
|
|
|
# build
|
|
# we want to build statically linked binaries
|
|
export CGO_ENABLED=0
|
|
echo "-> building..."
|
|
gox \
|
|
-os="${XC_OS}" \
|
|
-arch="${XC_ARCH}" \
|
|
-osarch="${XC_EXCLUDE_OSARCH}" \
|
|
-output "output/{{.OS}}_{{.Arch}}/atlantis" \
|
|
.
|
|
|
|
# Zip and copy to the dist dir
|
|
echo ""
|
|
echo "Packaging..."
|
|
for PLATFORM in $(find ./output -mindepth 1 -maxdepth 1 -type d); do
|
|
OSARCH=$(basename ${PLATFORM})
|
|
echo "--> ${OSARCH}"
|
|
|
|
pushd $PLATFORM >/dev/null 2>&1
|
|
zip ../atlantis_${OSARCH}.zip ./*
|
|
popd >/dev/null 2>&1
|
|
done
|
|
|
|
echo ""
|
|
echo ""
|
|
echo "-----------------------------------"
|
|
echo "Output:"
|
|
ls -alh output/ |