File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- # Ensure measuring directory exists
6- mkdir -p measuring
5+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
6+ REPO_ROOT=" $( cd " $SCRIPT_DIR /../.." && pwd) "
7+
8+ # Ensure measuring directory exists at repo root (TS writes ../../measuring/use_gqm.md)
9+ mkdir -p " $REPO_ROOT /measuring"
710
811# Create use_gqm.md if it doesn't exist
9- if [ ! -f measuring/use_gqm.md ]; then
10- cat > measuring/use_gqm.md << 'EOF '
12+ if [ ! -f " $REPO_ROOT / measuring/use_gqm.md" ]; then
13+ cat > " $REPO_ROOT / measuring/use_gqm.md" << 'EOF '
1114# Goals, Questions, Metrics
1215
1316```mermaid
@@ -16,7 +19,8 @@ graph LR;
1619EOF
1720fi
1821
19- # Run the TypeScript code
22+ # Run the TypeScript code (package.json lives here)
23+ cd " $SCRIPT_DIR "
2024npm install
2125npm run start || true # Continue even if tests fail
2226
@@ -25,6 +29,7 @@ if [ "${ACT:-}" = "true" ]; then
2529 echo " Running in act - simulating successful git operations"
2630 exit 0
2731else
32+ cd " $REPO_ROOT "
2833 git add measuring/use_gqm.md
2934 git diff --staged --quiet || (git commit -m " Update Goals Questions Metrics Graph" && git push origin " HEAD:${GITHUB_REF} " )
30- fi
35+ fi
You can’t perform that action at this time.
0 commit comments