Skip to content

Commit 62053e9

Browse files
bougymanCopilot
andauthored
fix: Have to build the gem before we can find it, doh (#13)
* fix: Have to build the gem before we can find it, doh * Update ci/publish-gem.sh DO NOT ACCEPT COPILOT COMMITS Co-authored-by: Copilot <[email protected]> * fix: Update ci/publish-gem.sh Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 9df73bb commit 62053e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ci/publish-gem.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fi # }}}
1616
me=${BASH_SOURCE[0]}
1717
[ -L "$me" ] && me=$($readlink -f "$me")
1818
here=$(cd "$(dirname "$me")" && pwd)
19+
root=$(cd "$here/.." && pwd)
1920
just_me=$(basename "$me")
2021

2122
: "${GEM_NAME:=leopard}"
@@ -58,6 +59,8 @@ then
5859
chmod 600 ~/.gem/credentials
5960
fi
6061

62+
bundle exec gem build
63+
6164
if [ -f "$here"/../.version.txt ]
6265
then
6366
version=$(<"$here"/../.version.txt)
@@ -67,9 +70,9 @@ fi
6770

6871
if [ -z "$version" ]
6972
then
70-
gem="$(ls "$here"/../"$GEM_NAME"-*.gem | tail -1)"
73+
gem="$(ls "$root"/"$GEM_NAME"-*.gem | tail -1)"
7174
else
72-
gem="$(printf '%s/../%s-%s.gem' "$here" "$GEM_NAME" "$version")"
75+
gem="$(printf '%s/%s-%s.gem' "$root" "$GEM_NAME" "$version")"
7376
fi
7477

7578
if [ ! -f "$gem" ]
@@ -83,7 +86,6 @@ then
8386
printf "DEBUG: [%s] Building And Publishing %s to %s\n" "$just_me" "$gem" "$gem_host" >&2
8487
fi
8588

86-
bundle exec gem build
8789
bundle exec gem push -k "$gem_key" --host "$gem_host" "$(basename "$gem")"
8890

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

0 commit comments

Comments
 (0)