Last active
August 29, 2015 13:56
-
-
Save hkraji/9050225 to your computer and use it in GitHub Desktop.
DTK Build client
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
#!/usr/bin/env bash | |
if [ -z $1 ]; | |
then | |
client_branch="master" | |
else | |
client_branch=$1 | |
fi | |
if [ -z $2 ]; | |
then | |
common_branch="master" | |
else | |
common_branch=$2 | |
fi | |
if [ -z $3 ]; | |
then | |
common_core_branch="master" | |
else | |
common_core_branch=$3 | |
fi | |
echo "Uninstalling gems" | |
gem cleanup dtk-client | |
gem uninstall dtk-client -x | |
gem cleanup dtk-common | |
gem uninstall dtk-client -x | |
echo "Building gems" | |
start_location=`pwd` | |
if [ -d "$HOME/dtk-common-repo" ]; then | |
cd "$HOME/dtk-common-repo" | |
git checkout $common_core_branch -b origin/$common_core_branch --quiet | |
version=`gem build dtk-common-core.gemspec | grep Version | cut -d':' -f2 | tr -d ' '` | |
gem install dtk-common-core-$version.gem --no-ri --no-rdoc | |
fi | |
if [ -d "$HOME/dtk-common" ]; then | |
cd "$HOME/dtk-common" | |
git checkout $common_branch -b origin/$common_branch --quiet | |
version=`gem build dtk-common.gemspec | grep Version | cut -d':' -f2 | tr -d ' '` | |
gem install dtk-common-$version.gem --no-ri --no-rdoc | |
fi | |
if [ -d "$HOME/dtk-client" ]; then | |
cd "$HOME/dtk-client" | |
git checkout $client_branch -b origin/$client_branch --quiet | |
version=`gem build dtk-client.gemspec | grep Version | cut -d':' -f2 | tr -d ' '` | |
gem install dtk-client-$version.gem --no-ri --no-rdoc | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment