-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aa89a2
commit ddd7a97
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Load RVM into a shell session *as a function* | ||
# Loading RVM *as a function* is mandatory | ||
# so that we can use 'rvm use <specific version>' | ||
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then | ||
# First try to load from a user install | ||
source "$HOME/.rvm/scripts/rvm" | ||
echo "using user install $HOME/.rvm/scripts/rvm" | ||
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then | ||
# Then try to load from a root install | ||
source "/usr/local/rvm/scripts/rvm" | ||
echo "using root install /usr/local/rvm/scripts/rvm" | ||
else | ||
echo "ERROR: An RVM installation was not found.\n" | ||
fi | ||
|
||
rvm use ruby | ||
gem build rtype-legacy.gemspec | ||
gem build rtype-legacy-java.gemspec | ||
gem build rtype-legacy-native.gemspec | ||
|
||
rvm use jruby | ||
gem build rtype-legacy.gemspec |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
help() { | ||
echo "deploy [OPTIONS]" | ||
echo " -h Prints help" | ||
echo " -v ARG Specifies gem version (required)" | ||
exit 0 | ||
} | ||
|
||
OPTIONS=$( getopt -o v:,h -- "$@" ) | ||
|
||
[ $? -ne 0 ] && exit 1 | ||
|
||
set -- $OPTIONS | ||
|
||
while true; do | ||
case $1 in | ||
-v ) | ||
VERSION=$2 | ||
gem push rtype-legacy-${VERSION}.gem | ||
gem push rtype-legacy-${VERSION}-java.gem | ||
gem push rtype-legacy-java-${VERSION}-java.gem | ||
gem push rtype-legacy-native-${VERSION}.gem | ||
shift | ||
;; | ||
-h ) | ||
help | ||
;; | ||
-- ) | ||
# shift | ||
# break | ||
echo "Option -h or -v required" | ||
exit 1 | ||
;; | ||
* ) | ||
echo "Unknown option: $1" | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
if [ $# -ne 0 ]; then | ||
echo "Unknown option(s): $@" | ||
exit 1 | ||
fi |