Skip to content

Commit 3dcbd3c

Browse files
authored
fix: Fixes the gem publisher, and adds missing .version.txt (#11)
* fix: Fixes the gem publisher, and adds missing .version.txt * fix: Uses $here to ground the relative path
1 parent 8adc7bd commit 3dcbd3c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.2

ci/publish-gem.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,25 @@ else
6565
version=$(git describe --tags --abbrev=0 | sed -e 's/^v//')
6666
fi
6767

68-
gem="$(printf '%s-%s.gem' "$GEM_NAME" "$version")"
68+
if [ -z "$version" ]
69+
then
70+
gem="$(ls "$here"/../"$GEM_NAME"-*.gem | tail -1)"
71+
else
72+
gem="$(printf '%s/../%s-%s.gem' "$here" "$GEM_NAME" "$version")"
73+
fi
74+
75+
if [ ! -f "$gem" ]
76+
then
77+
printf 'No gem file found: %s\n' "$gem" >&2
78+
exit 1
79+
fi
80+
6981
if [[ "${TRACE:-false}" == true || "${ACTIONS_STEP_DEBUG:-false}" == true ]]
7082
then
7183
printf "DEBUG: [%s] Building And Publishing %s to %s\n" "$just_me" "$gem" "$gem_host" >&2
7284
fi
7385

7486
bundle exec gem build
75-
bundle exec gem push -k "$gem_key" --host "$gem_host" "$gem"
87+
bundle exec gem push -k "$gem_key" --host "$gem_host" "$(basename "$gem")"
7688

7789
# vim: set foldmethod=marker et ts=4 sts=4 sw=4 ft=bash :

0 commit comments

Comments
 (0)