Repository navigation
Harden upload.sh and add bats tests - #4
Merged
Merged
Conversation
…ts CI. Consumers pinning @v1 currently skip the nullglob fix; quoting, token checks, and tests make the next floating tag safe to cut. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Hardens package uploads and adds automated shell validation.
Changes:
- Improves validation, quoting, CLI installation, and upload routing.
- Adds Bats tests and shellcheck CI jobs.
- Updates documentation and license dates.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
upload.sh |
Hardens upload execution and validation. |
test/upload.bats |
Adds upload behavior tests. |
.github/workflows/codetests.yml |
Runs Bats and shellcheck in CI. |
README.md |
Fixes typos and documents floating tags. |
LICENSE |
Updates the copyright range. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| cat > "${BIN}/package_cloud" <<'EOF' | ||
| #!/usr/bin/env bash | ||
| printf '%s\n' "$*" >> "${PACKAGECLOUD_LOG}" |
Comment on lines
+12
to
+15
| cat > "${BIN}/package_cloud" <<'EOF' | ||
| #!/usr/bin/env bash | ||
| printf '%s\n' "$*" >> "${PACKAGECLOUD_LOG}" | ||
| EOF |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upload.shto dropsudo gem install, quote paths, and fail on missing token/file or empty package folders (deb-only folders still succeed).test-and-lintworkflow (bats + shellcheck).@v1/@v1.Nfloat from avN.N.Ntag.Test plan
shellcheck upload.shbats test(10 cases)batsandshellcheckjobs on this PRMade with Cursor