Skip to content

Commit 5d6eea1

Browse files
committed
feat(release): make GitHub release creation the default
- Change WITH_GH_RELEASE default from false to true - Replace --with-gh-release flag with --without-gh-release - Reorder checks so flag is respected in dry-run mode - Isolate coverage threshold tests from env config
1 parent 8d7c09e commit 5d6eea1

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

release.sh

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SANDBOX_MODE=false
2828
FORCE_MODE=false
2929
VERBOSE_MODE=false
3030
JSON_OUTPUT=false
31-
WITH_GH_RELEASE=false
31+
WITH_GH_RELEASE=true
3232

3333
# State tracking
3434
RELEASE_STATE_DIR=""
@@ -53,7 +53,7 @@ Options:
5353
--force Skip all interactive confirmations (for CI)
5454
--verbose Enable detailed logging
5555
--json Output machine-readable JSON summary
56-
--with-gh-release Create the GitHub release automatically
56+
--without-gh-release Skip creating the GitHub release
5757
--rollback Restore files from most recent backup
5858
-h, --help Show this help message
5959
@@ -682,22 +682,18 @@ function release::create_github_release() {
682682
local version=$1
683683
local notes_file=$2
684684

685+
if [[ "$WITH_GH_RELEASE" != true ]]; then
686+
release::log_info "Skipping GitHub release (--without-gh-release specified)"
687+
return
688+
fi
689+
685690
if [[ "$DRY_RUN" == true ]]; then
686691
release::log_dry_run "Would create GitHub release $version with assets:"
687692
release::log_dry_run " - bin/bashunit"
688693
release::log_dry_run " - bin/checksum"
689694
return
690695
fi
691696

692-
if [[ "$WITH_GH_RELEASE" != true ]]; then
693-
release::log_info "To create the GitHub release, run:"
694-
echo -e " ${BLUE}gh release create $version bin/bashunit bin/checksum \\"
695-
echo -e " --title \"$version\" --notes-file \"$notes_file\"${NC}"
696-
echo ""
697-
release::log_info "Or re-run with --with-gh-release flag"
698-
return
699-
fi
700-
701697
if ! release::confirm_action "Do you want to create the GitHub release now?"; then
702698
release::log_warning "Skipping GitHub release creation"
703699
return
@@ -890,8 +886,8 @@ function release::main() {
890886
JSON_OUTPUT=true
891887
shift
892888
;;
893-
--with-gh-release)
894-
WITH_GH_RELEASE=true
889+
--without-gh-release)
890+
WITH_GH_RELEASE=false
895891
shift
896892
;;
897893
--rollback)

0 commit comments

Comments
 (0)