Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Commit bef3f37

Browse files
fix: always make cli destination folder (#21)
* fix: always make cli destination folder * fix: move binary to independent location
1 parent 1773e35 commit bef3f37

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/scripts/main.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ basic_name="cci-sagemaker"
119119
binary_name="${basic_name}-${binary_version}-${PLATFORM}-${ARCH}"
120120
binary_zip="${orb_bin_dir}/${binary_name}.zip"
121121
# Where to move the binary
122-
path_destination="/home/circleci/bin"
122+
path_destination="$HOME/bin"
123123
# Slack orb seems to put this outside the script as a parameter
124124
# https://github.com/CircleCI-Public/slack-orb-go/blob/8c4e86c9a787c240138244610aada066059b5b46/src/commands/notify.yml#L80
125125
# TODO: keep support for this? Or will people not bother? They would have to do to the packagecloud URL and find it
@@ -180,6 +180,13 @@ if ! chmod +x "${orb_bin_dir}/${binary_name}"; then
180180
fi
181181

182182
printf '%s\n' "Moving $binary_name to PATH and renaming to ${basic_name}..."
183+
mkdir -p "$path_destination"
184+
# shellcheck disable=SC2016
185+
# shellcheck disable=SC2086
186+
echo 'export PATH='${path_destination}':$PATH' >> "$BASH_ENV"
187+
# shellcheck disable=SC1090
188+
# shellcheck disable=SC3046
189+
source "$BASH_ENV"
183190
if ! mv "$orb_bin_dir/$binary_name" "${path_destination}/${basic_name}"; then
184191
print_error "Failed to move $orb_bin_dir/$binary_name binary executable."
185192
exit 1

0 commit comments

Comments
 (0)