Fix release version and date in UI. (#1025)
This commit is contained in:
parent
bef9e7c666
commit
bb66a8b791
|
@ -70,3 +70,6 @@ jobs:
|
|||
push: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
build-args: |
|
||||
VERSION=${{ github.ref_name }}
|
||||
COMMIT_SHA=${{ github.sha }}
|
||||
|
|
|
@ -29,7 +29,11 @@ COPY ui/package.json ui/package-lock.json /app/ui
|
|||
RUN npm ci
|
||||
|
||||
COPY ui/ /app/ui
|
||||
RUN npm run build -- --base=$UI_PUBLIC_URL
|
||||
RUN if [ "$BUILD_DATE" = "" ]; then \
|
||||
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ'); \
|
||||
export REACT_APP_BUILD_DATE=${BUILD_DATE}; \
|
||||
fi; \
|
||||
npm run build -- --base=$UI_PUBLIC_URL
|
||||
|
||||
### Build API ###
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-bookworm AS api
|
||||
|
|
|
@ -220,6 +220,8 @@ It may take a long time to build dependencies when launching servers first time.
|
|||
|
||||
```sh
|
||||
$ docker build --target ui -t photoview/ui . # Build image for development
|
||||
$ docker run --rm -it -v `pwd`:/app --network host --env-file ui/example.env photoview/ui \
|
||||
npm install # Install dependencies
|
||||
$ docker run --rm -it -v `pwd`:/app --network host --env-file ui/example.env photoview/ui \
|
||||
npm run mon # Monitor source code and (re)launch UI server
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue