From d47514e2ebf5b3c0c5a7844d7cba3058863ddd72 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 12:40:05 -0700 Subject: [PATCH 01/12] fix: Update README badges to point to correct repository and workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change repository from E3SM-Project/QuickView to ayenpure/QuickView - Update workflow references to match actual workflows: - ci.yml → test.yml - pre-commit.yml → package-and-release.yml - Fix broken badge rendering on GitHub --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f65027..a1a7b2a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # QuickView -[![CI](https://github.com/E3SM-Project/QuickView/actions/workflows/ci.yml/badge.svg)](https://github.com/E3SM-Project/QuickView/actions/workflows/ci.yml) -[![Pre-commit](https://github.com/E3SM-Project/QuickView/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/E3SM-Project/QuickView/actions/workflows/pre-commit.yml) +[![Test](https://github.com/ayenpure/QuickView/actions/workflows/test.yml/badge.svg)](https://github.com/ayenpure/QuickView/actions/workflows/test.yml) +[![Package and Release](https://github.com/ayenpure/QuickView/actions/workflows/package-and-release.yml/badge.svg)](https://github.com/ayenpure/QuickView/actions/workflows/package-and-release.yml) A scientific visualization application for exploring atmospheric data from the E3SM (Energy Exascale Earth System Model) project. From b2b8e2ac729a979ae8402122e3fbd323583d550e Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 22:29:34 -0700 Subject: [PATCH 02/12] fix: Add Git LFS support to workflows and revert view_manager changes - Add 'lfs: true' to checkout actions in package-and-release workflow - Add verification step to ensure LFS files are downloaded correctly - Update finalize-release workflow to also use LFS checkout - Revert view_manager.py error handling changes as they were not the issue - The actual issue was LFS files not being pulled during packaging --- .github/workflows/finalize-release.yml | 1 + .github/workflows/package-and-release.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/finalize-release.yml b/.github/workflows/finalize-release.yml index fbb8940..55eaf9c 100644 --- a/.github/workflows/finalize-release.yml +++ b/.github/workflows/finalize-release.yml @@ -25,6 +25,7 @@ jobs: uses: actions/checkout@v4 with: ref: release + lfs: true - name: Get version from files run: | diff --git a/.github/workflows/package-and-release.yml b/.github/workflows/package-and-release.yml index f9785df..2269c09 100644 --- a/.github/workflows/package-and-release.yml +++ b/.github/workflows/package-and-release.yml @@ -20,6 +20,16 @@ jobs: runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 + with: + lfs: true + + - name: Verify LFS files + run: | + echo "Checking LFS files..." + ls -la quickview/data/ + file quickview/data/globe.vtk + file quickview/data/connectivity.nc + echo "LFS file check complete" - name: Get version for tagging id: get_version From e7d56d38cfba0a766345f1dd9b8b42d75c830eae Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 22:44:58 -0700 Subject: [PATCH 03/12] fix: Update create-release-pr workflow for better flexibility - Use dynamic branch reference (github.ref_name) instead of hardcoded 'master' - Add LFS support to checkout action - Add --allow-dirty flag to bump2version to handle uncommitted changes - Fix version extraction to use __init__.py properly - Improve PR creation to work from any branch to release branch --- .github/workflows/create-release-pr.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index fe90905..5a6d1eb 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -23,8 +23,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 + ref: ${{ github.ref_name }} # Use the current branch name dynamically + lfs: true - name: Set up Python uses: actions/setup-python@v4 @@ -41,8 +43,13 @@ jobs: - name: Bump version run: | - bump2version ${{ github.event.inputs.version_type }} --verbose --no-commit --no-tag - echo "VERSION=$(python -c "from quickview import __version__; print(__version__)")" >> $GITHUB_ENV + bump2version ${{ github.event.inputs.version_type }} --verbose --allow-dirty + echo "VERSION=$(python -c "import sys; sys.path.insert(0, '.'); import __init__; print(__init__.__version__)")" >> $GITHUB_ENV + + - name: Push version bump to main + run: | + git push origin ${{ github.ref_name }} + git push origin --tags - name: Get commit hash for version bump run: | @@ -76,11 +83,11 @@ jobs: - name: Create Release Pull Request uses: peter-evans/create-pull-request@v6 with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} base: release - branch: release-v${{ env.VERSION }} + head: ${{ github.ref_name }} title: "Release v${{ env.VERSION }}" - commit-message: "chore: bump version to ${{ env.VERSION }}" + commit-message: "Merging release v${{ env.VERSION }}" body-path: changelog.md labels: | release From 422d48332faad82e21b2bd46ddb9955414fd2ed8 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:15:36 -0700 Subject: [PATCH 04/12] refactor: Remove create-release-pr workflow and clean up release.sh - Remove create-release-pr.yml workflow as release process is being simplified - Clean up release.sh script by removing all special characters: - Remove ANSI color codes for terminal output - Replace Unicode arrows with ASCII equivalents - Remove emoji characters for better compatibility - Remove backticks from markdown formatting in PR body - Keep core functionality intact while improving cross-platform compatibility --- .github/workflows/create-release-pr.yml | 145 ------------- release.sh | 258 ++++++++++++++++++++++++ 2 files changed, 258 insertions(+), 145 deletions(-) delete mode 100644 .github/workflows/create-release-pr.yml create mode 100644 release.sh diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml deleted file mode 100644 index 5a6d1eb..0000000 --- a/.github/workflows/create-release-pr.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: Create Release PR -on: - workflow_dispatch: - inputs: - version_type: - description: "Version bump type" - required: true - default: "patch" - type: choice - options: - - patch - - minor - - major - -jobs: - create-release-pr: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - ref: ${{ github.ref_name }} # Use the current branch name dynamically - lfs: true - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - - name: Install bump2version - run: pip install bump2version - - - name: Configure git - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - - - name: Bump version - run: | - bump2version ${{ github.event.inputs.version_type }} --verbose --allow-dirty - echo "VERSION=$(python -c "import sys; sys.path.insert(0, '.'); import __init__; print(__init__.__version__)")" >> $GITHUB_ENV - - - name: Push version bump to main - run: | - git push origin ${{ github.ref_name }} - git push origin --tags - - - name: Get commit hash for version bump - run: | - echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Generate changelog for PR - id: changelog - run: | - # Get commits since last tag (excluding the version bump commit we just made) - LAST_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") - if [ -z "$LAST_TAG" ]; then - COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~1) - else - COMMITS=$(git log --oneline --pretty=format:"- %s" ${LAST_TAG}..HEAD~1) - fi - - # Save changelog to file for multiline output - echo "## Changes in this release" > changelog.md - echo "" >> changelog.md - if [ -z "$COMMITS" ]; then - echo "- Initial release" >> changelog.md - else - echo "$COMMITS" >> changelog.md - fi - echo "" >> changelog.md - echo "## Version Details" >> changelog.md - echo "- **Previous version**: ${LAST_TAG:-"None (initial release)"}" >> changelog.md - echo "- **New version**: v${{ env.VERSION }}" >> changelog.md - echo "- **Release type**: ${{ github.event.inputs.version_type }}" >> changelog.md - - - name: Create Release Pull Request - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - base: release - head: ${{ github.ref_name }} - title: "Release v${{ env.VERSION }}" - commit-message: "Merging release v${{ env.VERSION }}" - body-path: changelog.md - labels: | - release - ${{ github.event.inputs.version_type }} - assignees: ${{ github.actor }} - reviewers: ${{ github.actor }} - draft: false - delete-branch: false - - - name: Create PR body template - run: | - cat > pr_template.md << 'EOF' - ## Release v${{ env.VERSION }} - - This pull request contains all changes for the **v${{ env.VERSION }}** release. - - ### Release Checklist - - [x] Version bumped in all files (`__init__.py`, `pyproject.toml`, `tauri_conf.json`) - - [ ] All tests passing - - [ ] Documentation updated (if needed) - - [ ] Breaking changes documented (if any) - - [ ] Ready for production deployment - - $(cat changelog.md) - - ### Files Changed - - `__init__.py` - Version updated - - `pyproject.toml` - Version updated - - `tauri_conf.json` - Version updated - - ### Post-Merge Actions - After merging this PR: - 1. Tag `v${{ env.VERSION }}` will be created - 2. Tauri build will trigger automatically and create draft release with distributables - 3. Draft release will be published automatically after build completes - - ### Important Notes - - This is a **${{ github.event.inputs.version_type }}** release - - Review all changes carefully before merging - - Ensure all CI checks pass before merging - - --- - - **Release prepared by**: @${{ github.actor }} - **Release type**: ${{ github.event.inputs.version_type }} - **Target branch**: `release` - **Source commit**: ${{ env.COMMIT_SHA }} - EOF - - - name: Output PR information - run: | - echo "Release PR created successfully!" - echo "Version: v${{ env.VERSION }}" - echo "Release type: ${{ github.event.inputs.version_type }}" - echo "Check the Pull Requests tab to review and merge the release" diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..02248a9 --- /dev/null +++ b/release.sh @@ -0,0 +1,258 @@ +#!/bin/bash + +# Function to print output +print_status() { + echo "[INFO] $1" +} + +print_success() { + echo "[SUCCESS] $1" +} + +print_warning() { + echo "[WARNING] $1" +} + +print_error() { + echo "[ERROR] $1" +} + +# Function to show usage +show_usage() { + echo "Usage: $0 [patch|minor|major]" + echo "" + echo "This script will:" + echo " 1. Bump the version using bump2version" + echo " 2. Commit the changes to main" + echo " 3. Create a release PR from main to release branch" + echo "" + echo "Examples:" + echo " $0 patch # 0.1.0 -> 0.1.1" + echo " $0 minor # 0.1.0 -> 0.2.0" + echo " $0 major # 0.1.0 -> 1.0.0" +} + +# Function to check prerequisites +check_prerequisites() { + print_status "Checking prerequisites..." + + # Check if bump2version is installed + if ! command -v bump2version &> /dev/null; then + print_error "bump2version is not installed. Install it with: pip install bump2version" + exit 1 + fi + + # Check if gh CLI is installed + if ! command -v gh &> /dev/null; then + print_error "GitHub CLI is not installed. Install it from: https://cli.github.com/" + exit 1 + fi + + # Check if we're in a git repository + if ! git rev-parse --is-inside-work-tree &> /dev/null; then + print_error "Not in a git repository" + exit 1 + fi + + # Check if we're on main/master branch + current_branch=$(git branch --show-current) + if [[ "$current_branch" != "main" && "$current_branch" != "master" ]]; then + print_error "Must be on main or master branch. Currently on: $current_branch" + exit 1 + fi + + # Check if working directory is clean + if ! git diff-index --quiet HEAD --; then + print_error "Working directory is not clean. Please commit or stash your changes." + exit 1 + fi + + print_success "All prerequisites met" +} + +# Function to get current version from pyproject.toml +get_current_version() { + python -c "import tomllib; f=open('pyproject.toml','rb'); data=tomllib.load(f); f.close(); print(data['project']['version'])" +} + +# Function to get previous version from git tags +get_previous_version() { + git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0" +} + +# Function to generate changelog +generate_changelog() { + local prev_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + + if [ -z "$prev_tag" ]; then + echo "- Initial release" + else + # Get commits since last tag, excluding merge commits + git log --oneline --pretty=format:"- %s" --no-merges ${prev_tag}..HEAD | head -15 + fi +} + +# Function to bump version +bump_version() { + local version_type=$1 + + print_status "Getting current version..." + local old_version=$(get_current_version) + print_status "Current version: v$old_version" + + print_status "Bumping $version_type version..." + if ! bump2version $version_type --verbose; then + print_error "Failed to bump version" + exit 1 + fi + + local new_version=$(get_current_version) + print_success "Version bumped: v$old_version -> v$new_version" + + echo $new_version +} + +# Function to commit and push changes +commit_and_push() { + local version=$1 + local branch=$(git branch --show-current) + + print_status "Pushing changes to $branch..." + if ! git push origin $branch; then + print_error "Failed to push changes" + exit 1 + fi + + if ! git push origin --tags; then + print_error "Failed to push tags" + exit 1 + fi + + print_success "Changes pushed to $branch" +} + +# Function to create release PR +create_release_pr() { + local current_version=$1 + local previous_version=$(get_previous_version) + + # Determine release type + IFS='.' read -ra CURRENT <<< "$current_version" + IFS='.' read -ra PREVIOUS <<< "$previous_version" + + if [ "${CURRENT[0]}" != "${PREVIOUS[0]}" ]; then + release_type="major" + elif [ "${CURRENT[1]}" != "${PREVIOUS[1]}" ]; then + release_type="minor" + else + release_type="patch" + fi + + print_status "Generating changelog..." + local changelog=$(generate_changelog) + + print_status "Creating release PR..." + + # Create PR using GitHub CLI + gh pr create \ + --base release \ + --head $(git branch --show-current) \ + --title "Release v${current_version}" \ + --body "$(cat << EOF +## Release v${current_version} + +This pull request contains all changes for the **v${current_version}** release. + +### Release Information +- **Previous version**: v${previous_version} +- **New version**: v${current_version} +- **Release type**: ${release_type} +- **Release date**: $(date '+%Y-%m-%d') + +### What's Changed + +${changelog} + +### Release Checklist +- [x] Version bumped in all files +- [ ] All tests passing +- [ ] Documentation updated (if needed) +- [ ] Breaking changes documented (if any) +- [ ] Ready for production deployment + +### Files Updated +- quickview/__init__.py - Version updated to ${current_version} +- pyproject.toml - Version updated to ${current_version} +- src-tauri/tauri.conf.json - Version updated to ${current_version} +- src-tauri/Cargo.toml - Version updated to ${current_version} + +### Post-Merge Actions +After merging this PR: +1. Git tag v${current_version} will be available +2. Tauri build will trigger automatically +3. Draft release will be created with distributables +4. Release will be published automatically with release notes + +### Important Notes +- This is a **${release_type}** release +- Review all changes carefully before merging +- Ensure all CI checks pass before merging + +--- + +**Release prepared by**: @$(git config user.name) +**Release type**: ${release_type} +**Target branch**: release +**Commit count**: $(git rev-list --count HEAD ^$(git merge-base HEAD release) 2>/dev/null || echo "N/A") +EOF +)" \ + --assignee @me \ + --label "release,${release_type}" || { + print_error "Failed to create PR" + exit 1 + } + + print_success "Release PR created successfully!" +} + +# Main function +main() { + # Check if version type is provided + if [ $# -eq 0 ]; then + show_usage + exit 1 + fi + + local version_type=$1 + + # Validate version type + if [[ ! "$version_type" =~ ^(patch|minor|major)$ ]]; then + print_error "Invalid version type: $version_type" + show_usage + exit 1 + fi + + echo "QuickView Release Tool" + echo "======================" + + # Run checks + check_prerequisites + + # Bump version + local new_version=$(bump_version $version_type) + + # Commit and push changes + commit_and_push $new_version + + # Create release PR + create_release_pr $new_version + + echo "" + print_success "Release process completed!" + echo "Version: v$new_version ($version_type)" + echo "Review and merge the PR to trigger the release pipeline" + echo "PR URL: $(gh pr view --json url --jq .url 2>/dev/null || echo 'Check GitHub for PR link')" +} + +# Run main function +main "$@" From 232df0805480f93cdebeb648fb128a5f3f51c94f Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:18:26 -0700 Subject: [PATCH 05/12] fix: Correct syntax errors in release.sh script - Replace single quotes with double quotes in shell commands - Remove apostrophe from 'What's Changed' heading - Fix date format command to avoid quote parsing issues - Ensure script is syntactically valid and executable --- release.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 release.sh diff --git a/release.sh b/release.sh old mode 100644 new mode 100755 index 02248a9..b36e3e8 --- a/release.sh +++ b/release.sh @@ -72,12 +72,12 @@ check_prerequisites() { # Function to get current version from pyproject.toml get_current_version() { - python -c "import tomllib; f=open('pyproject.toml','rb'); data=tomllib.load(f); f.close(); print(data['project']['version'])" + python -c "import tomllib; f=open(\"pyproject.toml\",\"rb\"); data=tomllib.load(f); f.close(); print(data[\"project\"][\"version\"])" } # Function to get previous version from git tags get_previous_version() { - git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "0.0.0" + git describe --tags --abbrev=0 2>/dev/null | sed "s/^v//" || echo "0.0.0" } # Function to generate changelog @@ -137,8 +137,8 @@ create_release_pr() { local previous_version=$(get_previous_version) # Determine release type - IFS='.' read -ra CURRENT <<< "$current_version" - IFS='.' read -ra PREVIOUS <<< "$previous_version" + IFS="." read -ra CURRENT <<< "$current_version" + IFS="." read -ra PREVIOUS <<< "$previous_version" if [ "${CURRENT[0]}" != "${PREVIOUS[0]}" ]; then release_type="major" @@ -167,9 +167,9 @@ This pull request contains all changes for the **v${current_version}** release. - **Previous version**: v${previous_version} - **New version**: v${current_version} - **Release type**: ${release_type} -- **Release date**: $(date '+%Y-%m-%d') +- **Release date**: $(date +%Y-%m-%d) -### What's Changed +### What Changed ${changelog} @@ -251,7 +251,7 @@ main() { print_success "Release process completed!" echo "Version: v$new_version ($version_type)" echo "Review and merge the PR to trigger the release pipeline" - echo "PR URL: $(gh pr view --json url --jq .url 2>/dev/null || echo 'Check GitHub for PR link')" + echo "PR URL: $(gh pr view --json url --jq .url 2>/dev/null || echo Check GitHub for PR link)" } # Run main function From 079b134e89b170bc36c9f7a2bc681b4f966de0d4 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:21:35 -0700 Subject: [PATCH 06/12] fix: Only push new tag instead of all tags in release script - Prevents error when existing tags are already on remote - More efficient as it only pushes the specific new tag --- release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index b36e3e8..4fa01ea 100755 --- a/release.sh +++ b/release.sh @@ -123,8 +123,9 @@ commit_and_push() { exit 1 fi - if ! git push origin --tags; then - print_error "Failed to push tags" + # Push only the new tag + if ! git push origin v${version}; then + print_error "Failed to push tag v${version}" exit 1 fi From 35428ac48a7c551dbb2570e3020c44a288e50d7c Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:27:04 -0700 Subject: [PATCH 07/12] fix: Redirect status messages to stderr in release script - Prevents status messages from being captured as part of version string - Ensures only the actual version number is returned by bump_version function - Fixes issue where tag was being pushed as 'v[INFO]' instead of actual version --- release.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release.sh b/release.sh index 4fa01ea..03690fb 100755 --- a/release.sh +++ b/release.sh @@ -2,19 +2,19 @@ # Function to print output print_status() { - echo "[INFO] $1" + echo "[INFO] $1" >&2 } print_success() { - echo "[SUCCESS] $1" + echo "[SUCCESS] $1" >&2 } print_warning() { - echo "[WARNING] $1" + echo "[WARNING] $1" >&2 } print_error() { - echo "[ERROR] $1" + echo "[ERROR] $1" >&2 } # Function to show usage From 1c0ed6c34550026349dc89aa91138d1319b18972 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:30:11 -0700 Subject: [PATCH 08/12] fix: Update release script to handle bump2version tag creation - bump2version is configured to create tags automatically - Script now pushes all tags instead of trying to create a specific tag - Fixes issue where script was trying to push malformed tag name --- release.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/release.sh b/release.sh index 03690fb..0e50eb1 100755 --- a/release.sh +++ b/release.sh @@ -123,13 +123,14 @@ commit_and_push() { exit 1 fi - # Push only the new tag - if ! git push origin v${version}; then - print_error "Failed to push tag v${version}" + # Push tags (bump2version already created the tag) + print_status "Pushing tags..." + if ! git push origin --tags; then + print_error "Failed to push tags" exit 1 fi - print_success "Changes pushed to $branch" + print_success "Changes and tags pushed to $branch" } # Function to create release PR From 1bbebc9bff4fd088239a8dbe28a20d05736117dc Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:31:41 -0700 Subject: [PATCH 09/12] fix: Only push the new tag and handle existing tags gracefully - Push only the specific new tag created by bump2version - Check if tag already exists on remote before failing - Warn instead of error when tag already exists - Prevents script failure when v0.1.0 or other existing tags are present --- release.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/release.sh b/release.sh index 0e50eb1..8ded976 100755 --- a/release.sh +++ b/release.sh @@ -123,11 +123,16 @@ commit_and_push() { exit 1 fi - # Push tags (bump2version already created the tag) - print_status "Pushing tags..." - if ! git push origin --tags; then - print_error "Failed to push tags" - exit 1 + # Push the new tag (bump2version already created it) + print_status "Pushing new tag v${version}..." + if ! git push origin v${version}; then + # Check if tag already exists on remote + if git ls-remote --tags origin | grep -q "refs/tags/v${version}$"; then + print_warning "Tag v${version} already exists on remote" + else + print_error "Failed to push tag v${version}" + exit 1 + fi fi print_success "Changes and tags pushed to $branch" From 5ad6d2d20ee5e0bb907ad3b705b0ea1ddba151f8 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:34:11 -0700 Subject: [PATCH 10/12] fix: Add debugging and improve bump2version output handling - Redirect all bump2version output to stderr to prevent capture - Add debug logging to track version string flow - Ensure clean version string is passed between functions - Quote version string to preserve exact value --- release.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index 8ded976..543ee59 100755 --- a/release.sh +++ b/release.sh @@ -101,7 +101,9 @@ bump_version() { print_status "Current version: v$old_version" print_status "Bumping $version_type version..." - if ! bump2version $version_type --verbose; then + # Redirect all bump2version output to stderr to avoid capturing it + bump2version $version_type --verbose >&2 + if [ $? -ne 0 ]; then print_error "Failed to bump version" exit 1 fi @@ -109,7 +111,10 @@ bump_version() { local new_version=$(get_current_version) print_success "Version bumped: v$old_version -> v$new_version" - echo $new_version + # Debug: show what we're returning + print_status "Returning version: $new_version" >&2 + + echo "$new_version" } # Function to commit and push changes @@ -117,6 +122,9 @@ commit_and_push() { local version=$1 local branch=$(git branch --show-current) + # Debug: show what version we received + print_status "Received version for push: '$version'" >&2 + print_status "Pushing changes to $branch..." if ! git push origin $branch; then print_error "Failed to push changes" From 56bb0df6ef5d1ea614faaaccc1854b69eb9ac91d Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:35:09 -0700 Subject: [PATCH 11/12] fix: Use bump2version --list to get clean version output - Use --list with --dry-run to determine new version before bumping - Avoids capturing any verbose output or template strings - Ensures clean version number is passed to subsequent functions - Fixes issue where 'vcurrent_version=0.1.0' was being used as tag name --- release.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/release.sh b/release.sh index 543ee59..3690034 100755 --- a/release.sh +++ b/release.sh @@ -100,20 +100,24 @@ bump_version() { local old_version=$(get_current_version) print_status "Current version: v$old_version" + # First, get what the new version will be + local new_version=$(bump2version --list $version_type --dry-run 2>/dev/null | grep "^new_version=" | cut -d= -f2) + if [ -z "$new_version" ]; then + print_error "Failed to determine new version" + exit 1 + fi + print_status "Bumping $version_type version..." - # Redirect all bump2version output to stderr to avoid capturing it + # Now actually bump the version bump2version $version_type --verbose >&2 if [ $? -ne 0 ]; then print_error "Failed to bump version" exit 1 fi - local new_version=$(get_current_version) print_success "Version bumped: v$old_version -> v$new_version" - # Debug: show what we're returning - print_status "Returning version: $new_version" >&2 - + # Return just the clean version number echo "$new_version" } From 378023bd640023e1efdd39a12f8c89934aebbc84 Mon Sep 17 00:00:00 2001 From: Abhishek Yenpure Date: Wed, 9 Jul 2025 23:47:38 -0700 Subject: [PATCH 12/12] =?UTF-8?q?Bump=20version:=200.1.0=20=E2=86=92=200.1?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- pyproject.toml | 2 +- quickview/__init__.py | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3f03c7c..c8db3f3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.0 +current_version = 0.1.1 commit = True tag = True diff --git a/pyproject.toml b/pyproject.toml index da74d7d..ebe6105 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "quickview" -version = "0.1.0" +version = "0.1.1" description = "An application to explore/analyze data for atmosphere component for E3SM" authors = [ {name = "Kitware Inc."}, diff --git a/quickview/__init__.py b/quickview/__init__.py index d52780e..0d46f69 100644 --- a/quickview/__init__.py +++ b/quickview/__init__.py @@ -1,5 +1,5 @@ """QuickView: Visual Analysis for E3SM Atmosphere Data.""" -__version__ = "0.1.0" +__version__ = "0.1.1" __author__ = "Kitware Inc." __license__ = "Apache-2.0" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e5f5c6f..d292009 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "app" -version = "0.1.0" +version = "0.1.1" description = "QuickView: Visual Analyis for E3SM Atmosphere Data" authors = ["Kitware"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d3fd620..f6e7ce3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ }, "package": { "productName": "QuickView", - "version": "0.1.0" + "version": "0.1.1" }, "tauri": { "allowlist": {