-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathruby.yaml
More file actions
42 lines (40 loc) · 1.47 KB
/
ruby.yaml
File metadata and controls
42 lines (40 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
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)