Created
March 19, 2015 18:52
-
-
Save halkeye/53645e3c8cf6edc8feb6 to your computer and use it in GitHub Desktop.
Quick script to build a complete uchiwa tarball
This file contains hidden or 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/bash | |
| export GOPATH=`pwd` | |
| set -e | |
| # grab and compile soruce code | |
| go get github.com/sensu/uchiwa | |
| cd $GOPATH/src/github.com/sensu/uchiwa | |
| export VERSION=$(head -n 1 CHANGELOG.md | sed 's/#\+ \([0-9.]\+\).*/\1/g') | |
| export TAR_FILE=${GOPATH}/uchiwa-${VERSION}.tar.gz | |
| if [ -f $TAR_FILE ]; then rm $TAR_FILE; fi | |
| echo $VERSION > VERSION | |
| # install bower | |
| npm install --production | |
| # install dependancies | |
| bower install | |
| # remove files we don't care about | |
| rm -rf bower.json config.json.example Dockerfile uchiwa docker node_modules test .git uchiwa.go .travis.yml | |
| # copy compiled bin | |
| cp $GOPATH/bin/uchiwa ./ | |
| cd .. | |
| # create tar file | |
| tar czf $TAR_FILE uchiwa | |
| # get out of tar file path | |
| cd $GOPATH | |
| # cleanup | |
| rm -rf src pkg bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment