Last active
November 9, 2018 19:52
-
-
Save daino3/c136bd5fd6751abf115a1e04edbc3c46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BOXNAME=`date +'vm_box_%m%d%Y_%H%M%S'` | |
vagrant destroy --force || exit $? | |
PACKAGING_BASE_BOX=1 vagrant up || exit $? | |
PACKAGING_BASE_BOX=1 vagrant package --out "$BOXNAME.box" || exit $? | |
vagrant box add $BOXNAME "./$BOXNAME.box" || exit $? | |
aws s3 cp "$BOXNAME.box" "s3://vagrant-boxes/" || exit $? | |
rm "./$BOXNAME.box" | |
echo "Set Vagrantfile box target to $BOXNAME and commit changes to VCS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment