-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Reilly Brogan <[email protected]>
- Loading branch information
1 parent
b307599
commit 9df8bc5
Showing
1 changed file
with
39 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,39 @@ | ||
actions: | ||
- gem_build: | ||
description: Build a ruby gem | ||
example: | | ||
%gem_build | ||
command: | | ||
function gem_build() { | ||
if [ -z "$1" ]; then | ||
gem build *.gemspec || exit 1 | ||
else | ||
gem build $* || exit 1 | ||
fi | ||
} | ||
gem_build | ||
dependencies: | ||
- binary(gem) | ||
|
||
- gem_install: | ||
description: Build a ruby gem | ||
example: | | ||
%gem_install | ||
command: | | ||
function gem_install() { | ||
export geminstalldir=$(ruby -e'puts Gem.default_dir') | ||
export GEM_HOME=$geminstalldir | ||
export GEM_PATH=$geminstalldir | ||
if [ -a *.gem ]; then | ||
gem install --ignore-dependencies --no-user-install --no-document -i "%(installroot)/$geminstalldir" -n "%(installroot)/usr/bin" *.gem || exit 1 | ||
else | ||
gem install --ignore-dependencies --no-user-install --no-document -i "%(installroot)/$geminstalldir" -n "%(installroot)/usr/bin" $sources/*.gem || exit 1 | ||
fi | ||
if [[ -e "%(installroot)/$geminstalldir/cache" ]]; then | ||
rm -rfv %(installroot)/$geminstalldir/cache | ||
fi | ||
} | ||
gem_install | ||
dependencies: | ||
- binary(gem) | ||
- binary(ruby) |