mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2024-12-26 12:28:15 +03:00
Add bwrs-version.json based upon latest tag.
- Add a bwrs-version.json based upon the latest tag of the bw_web_builds (Assuming a build is started/created after a new tag is created). - Updated node version to latest LTS, v13 is EOL, v14 is LTS until 2023-04-30 ( https://nodejs.org/en/about/releases/ )
This commit is contained in:
parent
f32981d4b1
commit
6aaf7ecc26
2 changed files with 11 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
|||
# docker cp $image_id:/bw_web_vault.tar.gz .
|
||||
# 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
|
||||
RUN mkdir /vault
|
||||
|
@ -40,6 +40,10 @@ RUN npm install
|
|||
RUN npm audit fix
|
||||
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
|
||||
# RUN find build -name "*.map" -delete
|
||||
|
||||
|
|
|
@ -46,11 +46,17 @@ git submodule update --recursive --init
|
|||
|
||||
# Build
|
||||
npm install
|
||||
npm audit fix
|
||||
npm run dist
|
||||
|
||||
# Delete debugging map files, optional
|
||||
#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
|
||||
mv build web-vault
|
||||
tar -czvf "../$OUTPUT_NAME" web-vault --owner=0 --group=0
|
||||
|
|
Loading…
Reference in a new issue