Skip to content

Commit

Permalink
WIP calculate changed apps
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Aug 22, 2024
1 parent db3c9aa commit ff5a67a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
with:
workflow-id: deploy
main-branch-name: "master"

- run: |
Expand All @@ -34,4 +35,11 @@ jobs:
run: pnpm -r install

- name: Check apps changed since the last successful commit
run: pnpm -r -F '[${{ env.NX_HEAD }}]' ls --depth -1 -j | jq -r '.[].path' | grep apps
run: |
changedApps=$(pnpm -r -F '[${{ env.NX_HEAD }}]' ls --depth -1 -j \
\| jq -r '.[] \
\| select(.path | contains("apps/")) | .name' \
\| xargs -I {} echo -n "-F '{}' ")
echo "Changed apps: $changedApps"
pnpm build -r $changedApps
exit 1
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"story:dev": "histoire dev",
"test": "vitest",
"typecheck": "vue-tsc --noEmit",
"up": "taze major -I",
"wait": "wait-on tcp:8001"
},
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"prepare": "husky",
"lint": "turbo lint --log-order=stream -F '!~duckguessr*' -- --cache --fix",
"lint-no-cache": "turbo lint --log-order=stream -F '!~duckguessr*' -- --fix",
"build:web": "NODE_ENV=production turbo build --log-order=stream -F '~web...'",
"build:edgecreator": "NODE_ENV=production turbo build --log-order=stream -F '~edgecreator' -F '~edgecreator-api'",
"build:api": "NODE_ENV=production turbo build --log-order=stream -F '~api...'",
"build:coa-updater": "NODE_ENV=production turbo build --log-order=stream -F '~coa-updater...'",
"build:duck-estimator": "NODE_ENV=production turbo build --log-order=stream -F '~duck-estimator...'",
"build:stats-updater": "NODE_ENV=production turbo build --log-order=stream -F '~stats-updater...'",
"build:web": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~web...'",
"build:edgecreator": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~edgecreator' --filter-prod '~edgecreator-api'",
"build:api": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~api...'",
"build:coa-updater": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~coa-updater...'",
"build:duck-estimator": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~duck-estimator...'",
"build:stats-updater": "NODE_ENV=production turbo build --log-order=stream --filter-prod '~stats-updater...'",
"dev:edgecreator": "turbo dev -F '~edgecreator-api...' -F '~edgecreator' -F '~web' -F '~edges'",
"dev:whattheduck": "turbo dev -F '~whattheduck' -F '~api' -F '~web'"
}
Expand Down

0 comments on commit ff5a67a

Please sign in to comment.