Skip to content

Commit

Permalink
only generate diffs for upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
pvinis committed Jul 1, 2024
1 parent a14b9f5 commit 6f771cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions scripts/compare-releases.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

import { gte } from "semver"

const left = process.argv[2]
const right = process.argv[3]

if (gte(left, right)) {
process.exit(0)
}
process.exit(1)
8 changes: 7 additions & 1 deletion scripts/new-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ function generateDiffs () {
if [ "$existingRelease" == "$newRelease" ]; then
continue
fi

echo "comparing $existingRelease to $newRelease"
if ./scripts/compare-releases.js "$existingRelease" "$newRelease"; then
echo "comparing $existingRelease to $newRelease IN"
continue
fi

git diff --binary -w -M15% origin/release/"$existingRelease"..origin/release/"$newRelease" > wt-diffs/diffs/"$existingRelease".."$newRelease".diff
done

Expand All @@ -126,7 +133,6 @@ function generateDiffs () {
}

function pushMaster () {
# commit and push
git add .
git commit -m "Add release $newRelease"
git push
Expand Down

0 comments on commit 6f771cb

Please sign in to comment.