-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathandroid_live_update.sh
More file actions
executable file
·41 lines (33 loc) · 1010 Bytes
/
Copy pathandroid_live_update.sh
File metadata and controls
executable file
·41 lines (33 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
cd "$(dirname "$0")"/..
COMMIT_SHA=$(git rev-parse HEAD)
COMMIT_REF=$(git branch --show-current)
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
COMMIT_DATE=$(git log -1 --pretty=format:"%cI")
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
cat <<EOF > web/public/live-update.json
{
"commitSha": "$COMMIT_SHA",
"commitRef": "$COMMIT_REF",
"commitMessage": "$COMMIT_MESSAGE",
"commitDate": "$COMMIT_DATE",
"buildDate": "$BUILD_DATE"
}
EOF
cat web/public/live-update.json
yarn build-web-view
echo npx @capawesome/cli apps:bundles:create \
--app-id 969bc540-8077-492f-8403-b554bee5de50 \
--channel default \
--commitMessage "$COMMIT_MESSAGE" \
--commitRef $COMMIT_REF \
--commitSha $COMMIT_SHA \
--path web/out
npx @capawesome/cli apps:bundles:create \
--app-id 969bc540-8077-492f-8403-b554bee5de50 \
--channel default \
--commitMessage "$COMMIT_MESSAGE" \
--commitRef $COMMIT_REF \
--commitSha $COMMIT_SHA \
--path web/out