Make sure to get the right frontend version
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-10-18 14:04:34 +02:00
parent 4b9592cfa1
commit 5b445221ec
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 29 additions and 4 deletions

View File

@ -17,18 +17,18 @@ steps:
pull: true
depends_on: [ fetch-tags ]
commands:
- export VERSION=${DRONE_TAG##v}
- if [ -z "$$VERSION" ]; then export VERSION=${DRONE_BRANCH}; fi
# TODO: Move to a yarn script
- wget https://dl.vikunja.io/frontend/vikunja-frontend-master.zip
- wget https://dl.vikunja.io/frontend/vikunja-frontend-$$VERSION.zip
- unzip vikunja-frontend-master.zip -d frontend
- sed -i 's/\\/api\\/v1//g' frontend/index.html
# Make sure that the -master suffix is added to release files
- export VERSION=${DRONE_TAG##v}
- if [ -z "$$VERSION" ]; then export VERSION=${DRONE_BRANCH}; fi
- sed -i "s/\$${version}/$$VERSION/g" package.json
- yarn install
- yarn dist --linux --windows
- name: release
- name: release-latest
image: plugins/s3:1
pull: true
settings:
@ -43,5 +43,30 @@ steps:
strip_prefix: dist/
source: dist/*
target: /desktop/master/
trigger:
branch:
- master
event:
- push
depends_on: [ build ]
- name: release-version
image: plugins/s3:1
pull: true
settings:
bucket: vikunja-releases
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
strip_prefix: dist/
source: dist/*
target: /desktop/${DRONE_TAG##v}/
trigger:
event:
- tag
depends_on: [ build ]