about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-09 17:29:25 -0700
committerGitHub <noreply@github.com>2024-05-09 17:29:25 -0700
commit1821a992abd1ff55a5af60f18b8af7e01af8bc77 (patch)
tree80c8d372634afa845bb395a25de4dff790b1f428 /Dockerfile
parent6e172b6ce359e88b0be3648c9ca92841fd90740d (diff)
downloadvoidsky-1821a992abd1ff55a5af60f18b8af7e01af8bc77.tar.zst
Use build arg in docker action to correctly pass git commit SHA (#3940)
* use env variables through docker args

* remove quotes

* use an output instead

* try that again

* write the variables to .env

* rm unused

* use short sha

* remove test branch
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 568cbf7b4..74106fd7f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,6 +15,10 @@ ENV GOARCH="amd64"
 ENV CGO_ENABLED=1
 ENV GOEXPERIMENT="loopvar"
 
+# Expo
+ARG EXPO_PUBLIC_BUNDLE_IDENTIFIER
+ENV EXPO_PUBLIC_BUNDLE_IDENTIFIER ${EXPO_PUBLIC_BUNDLE_IDENTIFIER:-dev}
+
 COPY . .
 
 #
@@ -29,10 +33,13 @@ RUN mkdir --parents $NVM_DIR && \
 RUN \. "$NVM_DIR/nvm.sh" && \
   nvm install $NODE_VERSION && \
   nvm use $NODE_VERSION && \
+  echo "Using bundle identifier: $EXPO_PUBLIC_BUNDLE_IDENTIFIER" && \
+  echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER" >> .env && \
+  echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env && \
   npm install --global yarn && \
   yarn && \
   yarn intl:build && \
-  yarn build-web
+  EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER EXPO_PUBLIC_BUNDLE_DATE=$() yarn build-web
 
 # DEBUG
 RUN find ./bskyweb/static && find ./web-build/static