|
4 | 4 |
|
5 | 5 | cd "$(dirname "$0")"/.. |
6 | 6 |
|
7 | | -yarn build-web-view |
| 7 | +COMMIT_SHA=$(git rev-parse HEAD) |
| 8 | +COMMIT_REF=$(git branch --show-current) |
| 9 | +COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s") |
| 10 | +COMMIT_DATE=$(git log -1 --pretty=format:"%cI") |
| 11 | +BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") |
| 12 | + |
| 13 | +cat <<EOF > web/public/live-update.json |
| 14 | +{ |
| 15 | + "commitSha": "$COMMIT_SHA", |
| 16 | + "commitRef": "$COMMIT_REF", |
| 17 | + "commitMessage": "$COMMIT_MESSAGE", |
| 18 | + "commitDate": "$COMMIT_DATE", |
| 19 | + "buildDate": "$BUILD_DATE" |
| 20 | +} |
| 21 | +EOF |
| 22 | + |
| 23 | +cat web/public/live-update.json |
| 24 | + |
| 25 | +#yarn build-web-view |
8 | 26 |
|
9 | 27 | echo npx @capawesome/cli apps:bundles:create \ |
10 | 28 | --app-id 969bc540-8077-492f-8403-b554bee5de50 \ |
11 | 29 | --channel default \ |
12 | | - --commitMessage "$(git log -1 --pretty=format:"%s")" \ |
13 | | - --commitRef $commitRef \ |
14 | | - --commitSha $commitSha \ |
| 30 | + --commitMessage "$COMMIT_MESSAGE" \ |
| 31 | + --commitRef $COMMIT_REF \ |
| 32 | + --commitSha $COMMIT_SHA \ |
15 | 33 | --path web/out |
16 | 34 |
|
17 | 35 | npx @capawesome/cli apps:bundles:create \ |
18 | 36 | --app-id 969bc540-8077-492f-8403-b554bee5de50 \ |
19 | 37 | --channel default \ |
20 | | - --commitMessage "$(git log -1 --pretty=format:"%s")" \ |
21 | | - --commitRef $commitRef \ |
22 | | - --commitSha $commitSha \ |
| 38 | + --commitMessage "$COMMIT_MESSAGE" \ |
| 39 | + --commitRef $COMMIT_REF \ |
| 40 | + --commitSha $COMMIT_SHA \ |
23 | 41 | --path web/out |
0 commit comments