chore: append +neko:xxx
to version in docker image
This commit is contained in:
parent
22284e0fda
commit
290f98ae8b
2 changed files with 9 additions and 0 deletions
|
@ -40,5 +40,7 @@ packages/backend/assets/instance.css
|
|||
|
||||
# dockerignore custom
|
||||
.git
|
||||
!.git/HEAD
|
||||
!.git/refs
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
|
|
@ -42,6 +42,11 @@ RUN pnpm run --filter native-utils build
|
|||
|
||||
# Copy in the rest of the files to compile
|
||||
COPY . ./
|
||||
# Create dummy .git/objects directory for `git rev-parse`
|
||||
RUN mkdir .git/objects
|
||||
# Write version info
|
||||
RUN bash -c 'NEW_COMMIT=$(git rev-parse --short HEAD) && sed -i -r "s/\"version\": \"([^+]+).*\",$/\"version\": \"\\1+neko:${NEW_COMMIT:0:7}\",/" package.json'
|
||||
# Compile
|
||||
RUN env NODE_ENV=production sh -c "pnpm run --filter '!native-utils' build && pnpm run gulp"
|
||||
|
||||
# Trim down the dependencies to only those for production
|
||||
|
@ -55,6 +60,8 @@ WORKDIR /firefish
|
|||
RUN apt-get update && apt-get install -y libvips-dev zip unzip tini ffmpeg
|
||||
|
||||
COPY . ./
|
||||
# Remove .git
|
||||
RUN rm -rf .git
|
||||
|
||||
COPY --from=build /firefish/packages/megalodon /firefish/packages/megalodon
|
||||
|
||||
|
|
Loading…
Reference in a new issue