Browse Source

fix build script for new rootsystem folder name

master
forest 2 years ago
parent
commit
ba33b5b212
  1. 40
      build.sh

40
build.sh

@ -2,36 +2,36 @@
rm -rf build
mkdir -p build/rootsystem
mkdir -p build/rootsystem/host-key-poller
mkdir -p build/rootsystem/ansible-wrapper
mkdir -p build/servergarden-rootsystem
mkdir -p build/servergarden-rootsystem/host-key-poller
mkdir -p build/servergarden-rootsystem/ansible-wrapper
GOOS=linux GOARCH=arm go build -o build/rootsystem/rootsystem *.go
GOOS=linux GOARCH=arm go build -o build/rootsystem/host-key-poller/host-key-poller host-key-poller/*.go
GOOS=linux GOARCH=arm go build -o build/servergarden-rootsystem/rootsystem *.go
GOOS=linux GOARCH=arm go build -o build/servergarden-rootsystem/host-key-poller/host-key-poller host-key-poller/*.go
GOOS=linux GOARCH=arm go build -o build/rootsystem/ansible-wrapper/ansible-playbook-wrapper ansible-wrapper/*.go
cp -r ansible-wrapper/callback_plugins build/rootsystem/ansible-wrapper/callback_plugins
cp ansible-wrapper/ansible.cfg build/rootsystem/ansible-wrapper/ansible.cfg
GOOS=linux GOARCH=arm go build -o build/servergarden-rootsystem/ansible-wrapper/ansible-playbook-wrapper ansible-wrapper/*.go
cp -r ansible-wrapper/callback_plugins build/servergarden-rootsystem/ansible-wrapper/callback_plugins
cp ansible-wrapper/ansible.cfg build/servergarden-rootsystem/ansible-wrapper/ansible.cfg
cp -r terraform-modules build/rootsystem/terraform-modules
cp -r ansible-roles build/rootsystem/ansible-roles
cp -r terraform-modules build/servergarden-rootsystem/terraform-modules
cp -r ansible-roles build/servergarden-rootsystem/ansible-roles
#remove symlinks/log files that rootsystem adds at runtime.
rm -f build/rootsystem/terraform-modules/*/roles
rm -f build/rootsystem/terraform-modules/*/ansible.cfg
rm -f build/rootsystem/terraform-modules/*/ansible-playbook-wrapper
rm -f build/rootsystem/terraform-modules/*/callback_plugins
rm -f build/rootsystem/terraform-modules/*/ansible-log.json
rm -f build/rootsystem/terraform-modules/*/ansible.log
rm -f build/servergarden-rootsystem/terraform-modules/*/roles
rm -f build/servergarden-rootsystem/terraform-modules/*/ansible.cfg
rm -f build/servergarden-rootsystem/terraform-modules/*/ansible-playbook-wrapper
rm -f build/servergarden-rootsystem/terraform-modules/*/callback_plugins
rm -f build/servergarden-rootsystem/terraform-modules/*/ansible-log.json
rm -f build/servergarden-rootsystem/terraform-modules/*/ansible.log
cp ReadMe.md build/rootsystem/ReadMe.md
cp ReadMe.md build/servergarden-rootsystem/ReadMe.md
cd build
tar "--exclude=.git" "--exclude=__pycache__" "--exclude=*.crt" "--exclude=*.key" -czvf rootsystem-arm.tar.gz rootsystem
tar "--exclude=.git" "--exclude=__pycache__" "--exclude=*.crt" "--exclude=*.key" -czvf servergarden-rootsystem-arm.tar.gz servergarden-rootsystem
cd ../
FILE_PATH="rootsystem-arm.tar.gz"
FILE_NAME="build/rootsystem-arm.tar.gz"
FILE_PATH="servergarden-rootsystem-arm.tar.gz"
FILE_NAME="build/servergarden-rootsystem-arm.tar.gz"
BUCKET_NAME="server-garden-artifacts"
AUTH_JSON="$(curl -sS -u "$BACKBLAZE_CRED" https://api.backblazeb2.com/b2api/v2/b2_authorize_account)"

Loading…
Cancel
Save