Skip to content

Commit a47ff91

Browse files
fix: Version-Bump Workflow/Script - Formatting before diff (#155)
## Description Set up Pre-Req's, and ensure that formatting is done before checking diff since it likes to not respect prettier formatting. --- ## Type of Change - [ ] New module - [X] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other --- ## Testing & Validation - [X] Tests pass (`bun test`) - [X] Code formatted (`bun run fmt`) - [ ] Changes tested locally --------- Co-authored-by: Atif Ali <[email protected]>
1 parent a8e2364 commit a47ff91

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/scripts/version-bump.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ main() {
190190

191191
done <<< "$modules"
192192

193+
# Always run formatter to ensure consistent formatting
194+
echo "🔧 Running formatter to ensure consistent formatting..."
195+
if command -v bun >/dev/null 2>&1; then
196+
bun fmt >/dev/null 2>&1 || echo "⚠️ Warning: bun fmt failed, but continuing..."
197+
else
198+
echo "⚠️ Warning: bun not found, skipping formatting"
199+
fi
200+
echo ""
201+
193202
echo "📋 Summary:"
194203
echo "Bump Type: $bump_type"
195204
echo ""

.github/workflows/version-bump.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ jobs:
2525
fetch-depth: 0
2626
token: ${{ secrets.GITHUB_TOKEN }}
2727

28+
- name: Set up Bun
29+
uses: oven-sh/setup-bun@v2
30+
with:
31+
bun-version: latest
32+
33+
- name: Set up Terraform
34+
uses: coder/coder/.github/actions/setup-tf@main
35+
36+
- name: Install dependencies
37+
run: bun install
38+
2839
- name: Extract bump type from label
2940
id: bump-type
3041
run: |

0 commit comments

Comments
 (0)