-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish Gator CLI binaries in release #1636
Conversation
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1636 +/- ##
==========================================
+ Coverage 52.66% 52.79% +0.12%
==========================================
Files 100 100
Lines 8540 8540
==========================================
+ Hits 4498 4509 +11
+ Misses 3684 3676 -8
+ Partials 358 355 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
.github/workflows/workflow.yaml
Outdated
cp bin/gator-${GOOS}-${GOARCH}${EXTENSION} ${tmp_dir}/gator${EXTENSION} | ||
pushd ${tmp_dir} | ||
if [[ ${EXTENSION} == ".exe" ]]; then | ||
zip ${GITHUB_WORKSPACE}/_dist/gator-${TAG}-${GOOS}-${GOARCH}.zip gator*.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: putting ${GITHUB_WORKSPACE}/_dist/gator-${TAG}-${GOOS}-${GOARCH}
into a would make the differences between these lines more obvious
# rename the binary to gator | ||
tmp_dir=$(mktemp -d) | ||
cp bin/gator-${GOOS}-${GOARCH}${EXTENSION} ${tmp_dir}/gator${EXTENSION} | ||
pushd ${tmp_dir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A way to make this simpler: skip the pushd
, popd
and move the rm
command into a trap
. Like so:
tmp_dir=$(mktemp -d)
trap 'rm -rf -- "${tmp_dir}"' EXIT
All that aside... Isn't this environment ephemeral? Perhaps we don't need to clean up at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Sertac Ozercan sozercan@gmail.com
What this PR does / why we need it:
Publishes Gator CLI binaries to release
Credits to @chewong for the original code
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: