Skip to content

Commit

Permalink
Fixing task.json patch
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimaceOfDespair committed Jan 10, 2025
1 parent 39c5880 commit 96c654d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ jobs:
# Extract major and minor and use run number for versioning unique vsix
MAJOR=$(echo ${{ github.ref_name }} | sed -E 's/.*v([[:digit:]]+)\.[[:digit:]]+.*/\1/')
MINOR=$(echo ${{ github.ref_name }} | sed -E 's/.*v[[:digit:]]+\.([[:digit:]]+).*/\1/')
echo "VERSION=$MAJOR.$MINOR.${{ github.run_number }}" >> $GITHUB_ENV
PATCH=${{ github.run_number }}
echo "VERSION=$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV
# Assume prerelease if existing release is marked as such, or tag contains hyphen
# This allows us to create prerelease by either pushing prerelease tags or
Expand All @@ -70,7 +71,8 @@ jobs:
echo "RELEASE_ARGS=" >> $GITHUB_ENV
fi
TASK_JSON=$(jq --arg Major $MAJOR --arg Minor $MINOR --arg Patch ${{ github.run_number }} '.version |= { "Major": $Major | tonumber, "Minor": $Minor | tonumber, "Patch": $Patch | tonumber }' src/SpotCheckV0/task.json) && echo $TASK_JSON > src/SpotCheckV0/task.json
jq --arg Major $MAJOR --arg Minor $MINOR --arg Patch $PATCH '.version |= { "Major": $Major | tonumber, "Minor": $Minor | tonumber, "Patch": $Patch | tonumber }' src/SpotCheckV0/task.json > src/SpotCheckV0/task.bak.json && mv src/SpotCheckV0/task.bak.json src/SpotCheckV0/task.json
cat src/SpotCheckV0/task.json
echo "EXISTING_RELEASE=$(gh release view ${{ github.ref_name }} --json name --jq '.name' || echo '')" >> $GITHUB_ENV
Expand Down

2 comments on commit 96c654d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 67.98% 637/937
🔴 Branches 52.25% 174/333
🔴 Functions 59.6% 90/151
🟡 Lines 68.35% 540/790

Test suite run success

20 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 96c654d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 67.98% 637/937
🔴 Branches 52.25% 174/333
🔴 Functions 59.6% 90/151
🟡 Lines 68.35% 540/790

Test suite run success

20 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 96c654d

Please sign in to comment.