Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ jobs:

- name: Build
run: pnpm run build
- name: Git Status
run: pnpm run test:git
- name: Unit Tests
run: pnpm run test


next:
name: 'Publish @next'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm test:git
- run: pnpm test
- run: git status
- run: git diff

- run: pnpm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
env:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"slack:notify": "cd tools/slack && pnpm notify",
"test:imports": "cd tools/import-tests && pnpm test",
"test": "pnpm lint && pnpm --filter \"./packages/**\" test && pnpm test:imports",
"test:git": "pnpm exec scripts/status-check.sh",
"version": "pnpm changeset version && pnpm run changelog"
},
"author": "Open Function Group",
Expand Down
28 changes: 28 additions & 0 deletions scripts/status-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this AI generated? It looks a lot more involved and complicated than I expect

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes it's mostly ai generate. I was facing some challenge with actions/checkout@v3. Went to AI for help

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's OK but make sure to really scrutinise what the AI is telling you. It's like you've handed the work out to an external contractor - sure they've delivered something that looks cool, but is it really what we want? Will the maintenance cost outweigh the development cost?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Noted, thanks for the feedback


# Check if git working tree is clean
# This script will fail if there are uncommitted changes

set -e
echo "Checking if git working tree is clean..."

if [ -z "$(git status --porcelain 2>/dev/null)" ]; then
echo "✓ Git working tree is clean"
exit 0
else
echo "❌ Git working tree has uncommitted changes"
echo ""
git status --porcelain

# Simple note about ast.json
if git status --porcelain | grep -q "ast.json"; then
echo ""
echo "Note: ast.json changes are often caused by the file not being checked into the build"
fi

echo ""
echo "Please commit or stash these changes before proceeding."
Comment thread
mtuchi marked this conversation as resolved.
exit 1
fi