Last active
June 20, 2019 00:37
-
-
Save hoenirvili/3c8f858a3865f3b31a3ee19c58ab2688 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/bash | |
# DEFAULTS | |
BRANCH=master | |
BUILDWIN=true | |
BUILDUNIX=true | |
while [[ $# > 0 ]] | |
do | |
key="$1" | |
case $key in | |
-b) | |
BRANCH="$2" | |
shift | |
;; | |
--win-only) | |
BUILDUNIX=false | |
;; | |
--unix-only) | |
BUILDWIN=false | |
;; | |
esac | |
shift | |
done | |
rm -rf /home/$USER/.local/share/juju/tools | |
mkdir /home/$USER/.local/share/juju/tools | |
mkdir /home/$USER/.local/share/juju/tools/devel | |
mkdir /home/$USER/.local/share/juju/tools/streams | |
if [ "$BUILDWIN" = true ] ; then | |
buildwin.sh $BRANCH | |
fi | |
if [ "$BUILDUNIX" = true ] ; then | |
buildunix.sh $BRANCH | |
fi |
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/bash | |
TOOLSDIR=$HOME/.local/share/juju/tools | |
#TOOLSDIR=$HOME/.juju/tools | |
mkdir -p $TOOLSDIR/devel | |
GOBIN=$GOPATH/bin | |
OldWD=$PWD | |
cd $GOPATH/src/github.com/juju/juju | |
git checkout $1 | |
godeps -f -u dependencies.tsv | |
go install github.com/juju/juju/... | |
VERSION=$(grep "const version" version/version.go | cut -d '"' -f 2) | |
TRUSTY=juju-$VERSION-trusty-amd64.tgz | |
CENTOS=juju-$VERSION-centos7-amd64.tgz | |
XENIAL=juju-$VERSION-xenial-amd64.tgz | |
YAKKETY=juju-$VERSION-yakkety-amd64.tgz | |
cd $OldWD | |
cp $GOBIN/jujud . | |
tar -czf $TRUSTY jujud | |
tar -czf $CENTOS jujud | |
tar -czf $XENIAL jujud | |
tar -czf $YAKKETY jujud | |
cp $TRUSTY $TOOLSDIR/devel | |
cp $CENTOS $TOOLSDIR/devel | |
cp $XENIAL $TOOLSDIR/devel | |
cp $YAKKETY $TOOLSDIR/devel | |
rm jujud | |
rm $TRUSTY | |
rm $CENTOS | |
rm $XENIAL | |
rm $YAKKETY |
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/bash | |
TOOLSDIR=$HOME/.local/share/juju/tools | |
mkdir -p $TOOLSDIR/devel | |
GOBIN=$GOPATH/bin | |
OldWD=$PWD | |
cd $GOPATH/src/github.com/juju/juju | |
git checkout $1 | |
godeps -f -u dependencies.tsv | |
GOOS=windows GOARCH=amd64 go install github.com/juju/juju/... | |
VERSION=$(grep "const version" version/version.go | cut -d '"' -f 2) | |
WIN=juju-$VERSION-win2012hvr2-amd64.tgz | |
WIN2=juju-$VERSION-win2012r2-amd64.tgz | |
WIN3=juju-$VERSION-win2012-amd64.tgz | |
WIN4=juju-$VERSION-win2016-amd64.tgz | |
WIN5=juju-$VERSION-win81-amd64.tgz | |
WIN6=juju-$VERSION-win10-amd64.tgz | |
WIN7=juju-$VERSION-win2008r2-amd64.tgz | |
WIN8=juju-$VERSION-win2016nano-amd64.tgz | |
cd $OldWD | |
cp $GOBIN/windows_amd64/jujud.exe . | |
tar -czf $WIN jujud.exe | |
tar -czf $WIN2 jujud.exe | |
tar -czf $WIN3 jujud.exe | |
tar -czf $WIN4 jujud.exe | |
tar -czf $WIN5 jujud.exe | |
tar -czf $WIN6 jujud.exe | |
tar -czf $WIN7 jujud.exe | |
tar -czf $WIN8 jujud.exe | |
cp $WIN $TOOLSDIR/devel | |
cp $WIN2 $TOOLSDIR/devel | |
cp $WIN3 $TOOLSDIR/devel | |
cp $WIN4 $TOOLSDIR/devel | |
cp $WIN5 $TOOLSDIR/devel | |
cp $WIN6 $TOOLSDIR/devel | |
cp $WIN7 $TOOLSDIR/devel | |
cp $WIN8 $TOOLSDIR/devel | |
rm jujud.exe | |
rm $WIN | |
rm $WIN2 | |
rm $WIN3 | |
rm $WIN4 | |
rm $WIN5 | |
rm $WIN6 | |
rm $WIN7 | |
rm $WIN8 |
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/bash | |
build.sh -b $1 | |
uploadtools.sh |
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/bash | |
TOOLSDIR=$HOME/.local/share/juju/tools | |
WWWHOME=/var/www/html | |
rm -rf $TOOLSDIR/streams | |
juju-metadata generate-tools --debug --stream devel | |
find $TOOLSDIR -type d -print0 | xargs -0 chmod 755 | |
find $TOOLSDIR -type f -print0 | xargs -0 chmod 644 | |
rm -rf $WWWHOME/toolsdir/tools | |
cp -r $TOOLSDIR $WWWHOME/toolsdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment