Change rc-build so it produces .vsix file that can be published 'as is'.

This commit is contained in:
Kris De Volder
2017-05-10 14:22:13 -07:00
parent 6bfb07eb8c
commit d6d8830e30
3 changed files with 61 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ jobs:
passed:
- trigger-rc-build
- task: build-concourse-rc
file: sts4/concourse/tasks/versioned-build.yml
file: sts4/concourse/tasks/rc-build.yml
params:
extension_id: vscode-concourse
on_failure:

44
concourse/tasks/rc-build.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
set -e
# Build an rc .vsix file, ready to be uploaded to vscode marketplace.
#
# An RC is built in a similar way as a snaphsot, except that
# we build it with a unqualified version (i.e. no pre-release qualifier)
# This is so that, if this candidate is aproved for publication,
# then the vsix can be uploaded as is (i.e.
# without requiring another rebuild/repackaging to change its version)
workdir=`pwd`
sources=$workdir/sts4/vscode-extensions/$extension_id
version=`cat version/version`
echo "extension_id=${extension_id}"
echo "version=${version}"
if [ -d "maven-cache" ]; then
echo "Prepopulating maven cache"
tar xzf maven-cache/*.tar.gz -C ${HOME}
else
echo "!!!No stored maven cache found!!! "
exit -1
fi
cd "sts4/vscode-extensions/${extension_id}"
npm version "${version%-*}" || true
echo "Version set to " `npm version`
echo -e "\n\n*Version: ${version}*" >> README.md
# Build commons vscode
cd ${sources}/../commons-vscode
npm install
cd "$sources"
npm install ../commons-vscode
npm install
npm run vsce-package
#Because the RC was with a unqualified version...
#The RC version qualifier isn't automaticlaly present in the file name.
#So we must explicitly rename the file to include the RC version qualifier.
cp *.vsix $workdir/out/$extension_id-${version}.vsix

View File

@@ -0,0 +1,16 @@
inputs:
- name: sts4
- name: maven-cache
- name: version
outputs:
- name: out
platform: linux
run:
path: sts4/concourse/tasks/rc-build.sh
params:
extension_id: undefined_extension_id
image_resource:
type: docker-image
source:
repository: kdvolder/sts4-build-env