Skip to content
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

argc_tag -> argc_tagname #16

Merged
merged 1 commit into from
Jan 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Runmefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,21 +260,21 @@ coverage.update_badge() {
}

# @cmd Verify that all files in dist/ correspond to the expected tag
# @arg tag! The tag against which the release was built
# @arg tagname! The tag against which the release was built
release.verify() {
log "Verifying release '$argc_tag'"
if [[ ! $argc_tag ]]; then
log "Verifying release '$argc_tagname'"
if [[ ! $argc_tagname ]]; then
err "Received empty tag, can't continue!"
exit 1
fi

if ! ls dist/ | grep -q "$argc_tag"; then
err "There are no files in dist/ that correspond to the tag '$argc_tag'"
if ! ls dist/ | grep -q "$argc_tagname"; then
err "There are no files in dist/ that correspond to the tag '$argc_tagname'"
exit 1
fi

if ls dist/ | grep -qv "$argc_tag"; then
err "There are files in dist/ that don't correspond to the tag '$argc_tag'"
if ls dist/ | grep -qv "$argc_tagname"; then
err "There are files in dist/ that don't correspond to the tag '$argc_tagname'"
exit 1
fi
}
Expand All @@ -287,9 +287,9 @@ build() {
}

# @cmd Publish release to PyPI
# @arg tag! Release tag (should have been created previously and used for building the release)
# @arg tagname! Release tag (should have been created previously and used for building the release)
publish.pypi() {
release.verify "$argc_tag"
release.verify "$argc_tagname"

catch pip install twine

Expand All @@ -303,11 +303,11 @@ publish.pypi() {
}

# @cmd Publish release to Github
# @arg tag! Git tag for release (should exist already, and should have been pushed to GitHub)
# @arg tagname! Git tag for release (should exist already, and should have been pushed to GitHub)
publish.github() {
log "Publishing to github, tag '$argc_tag'"
release.verify "$argc_tag"
catch gh release create "$argc_tag" --verify-tag --generate-notes --latest
log "Publishing to github, tag '$argc_tagname'"
release.verify "$argc_tagname"
catch gh release create "$argc_tagname" --verify-tag --generate-notes --latest
}

# @cmd Bump version
Expand Down