Attempt to fix build-atom-packahe.sh to work without a fatjar

This commit is contained in:
Kris De Volder
2018-02-21 16:19:52 -08:00
parent 500633c07a
commit f5544410f5
2 changed files with 22 additions and 6 deletions

View File

@@ -6,8 +6,10 @@ output=$workdir/out
#atom_commons=$workdir/sts4/atom-extensions/atom-commons
atom_package=$workdir/sts4/atom-extensions/$package_name
url=`cat fatjar/url`
fatjar_version=`cat fatjar/version`
if [ -e $fatjar ]; then
url=`cat fatjar/url`
fatjar_version=`cat fatjar/version`
fi
#cd $atom_commons
#npm install
@@ -16,11 +18,21 @@ cd $atom_package
#npm install ${atom_commons}
timestamp=`date -u +%Y%m%d%H%M`
if [ -e $fatjar ]; then
cat > properties.json << EOF
{
"jarUrl": "${url}"
}
EOF
else
cat > properties.json << EOF
{
"timestamp": "${timestamp}"
}
EOF
fi
npm install
@@ -44,8 +56,13 @@ git config user.name "Alex Boyko"
git add .
git commit \
-m "Publish ${fatjar_version}"
if [ -e $fatjar ]; then
git commit \
-m "Publish $fatjar_version"
else
git commit \
-m "Publish $timestamp"
fi
# Publish linkable artifact to S3
@@ -56,8 +73,6 @@ node ./node_modules/bundle-deps/bundle-deps .
basename=$(npm pack | tee /dev/tty)
timestamp=`date -u +%Y%m%d%H%M`
length=${#basename}
newName=${basename:0:${length}-4}-$timestamp${basename:${length}-4:${length}}

View File

@@ -2,6 +2,7 @@ inputs:
- name: sts4
- name: release_repo
- name: fatjar
optional: true
params:
package_name: atom-bosh
outputs: