Skip to content

Commit

Permalink
Set version.json in webassets
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed Apr 11, 2024
1 parent d2641e5 commit 809b2a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frontend/vscode/web-assets/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Should we pin this
FROM us-west1-docker.pkg.dev/foyle-public/images/vscode as build

# Build Args need to be after the FROM stage otherwise they don't get passed through to the RUN statment
ARG VERSION=unknown
ARG DATE=unknown
ARG COMMIT=unknown

COPY /frontend/vscode/web-assets /workspace
RUN /workspace/build.sh

Expand Down
10 changes: 9 additions & 1 deletion frontend/vscode/web-assets/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ rm go1.21.5.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc

cd ${DIR}
/usr/local/go/bin/go run . --vscode=/vscode --out=/assets
/usr/local/go/bin/go run . --vscode=/vscode --out=/assets

cat > /assets/version.json <<EOF
{
"version": "$VERSION",
"date": "$DATE",
"commit": "$COMMIT"
}
EOF

0 comments on commit 809b2a5

Please sign in to comment.