mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2024-12-27 04:48:17 +03:00
Merge pull request #33 from BlackDex/bwrs-version-file
Add bwrs-version.json based upon latest tag.
This commit is contained in:
commit
fe86339e17
2 changed files with 11 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
||||||
# docker cp $image_id:/bw_web_vault.tar.gz .
|
# docker cp $image_id:/bw_web_vault.tar.gz .
|
||||||
# docker rm $image_id
|
# docker rm $image_id
|
||||||
|
|
||||||
FROM node:13.8.0-stretch as build
|
FROM node:14.16.0-buster as build
|
||||||
|
|
||||||
# Prepare the folder to enable non-root, otherwise npm will refuse to run the postinstall
|
# Prepare the folder to enable non-root, otherwise npm will refuse to run the postinstall
|
||||||
RUN mkdir /vault
|
RUN mkdir /vault
|
||||||
|
@ -40,6 +40,10 @@ RUN npm install
|
||||||
RUN npm audit fix
|
RUN npm audit fix
|
||||||
RUN npm run dist
|
RUN npm run dist
|
||||||
|
|
||||||
|
RUN printf '{"version":"%s"}' \
|
||||||
|
$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | sed -E 's#.*?refs/tags/v##') \
|
||||||
|
> build/bwrs-version.json
|
||||||
|
|
||||||
# Delete debugging map files, optional
|
# Delete debugging map files, optional
|
||||||
# RUN find build -name "*.map" -delete
|
# RUN find build -name "*.map" -delete
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,17 @@ git submodule update --recursive --init
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
npm install
|
npm install
|
||||||
|
npm audit fix
|
||||||
npm run dist
|
npm run dist
|
||||||
|
|
||||||
# Delete debugging map files, optional
|
# Delete debugging map files, optional
|
||||||
#find build -name "*.map" -delete
|
#find build -name "*.map" -delete
|
||||||
|
|
||||||
|
# Create bwrs-version.json with the latest tag from the remote repo.
|
||||||
|
printf '{"version":"%s"}' \
|
||||||
|
$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | sed -E 's#.*?refs/tags/v##') \
|
||||||
|
> build/bwrs-version.json
|
||||||
|
|
||||||
# Prepare the final archives
|
# Prepare the final archives
|
||||||
mv build web-vault
|
mv build web-vault
|
||||||
tar -czvf "../$OUTPUT_NAME" web-vault --owner=0 --group=0
|
tar -czvf "../$OUTPUT_NAME" web-vault --owner=0 --group=0
|
||||||
|
|
Loading…
Reference in a new issue