c4k-website/infrastructure/c4k-website-build/image/resources/functions.sh

17 lines
572 B
Bash
Raw Normal View History

#!/bin/bash
function get-and-unzip-website-data() {
filename="website.zip"
2022-09-29 14:22:08 +00:00
curl -H "Authorization: token $AUTHTOKEN" -o $SOURCEDIR/$filename $GITREPOURL
unzip $SOURCEDIR/$filename -d $BUILDDIR
}
function build-and-extract-website() {
2022-09-30 15:54:26 +00:00
(cd $BUILDDIR; dir=$(ls); cd $dir; lein run;)
# websiteartifactname=$(ls target/ | grep -Eo "*.+\.war"); unzip target/$websiteartifactname
}
2022-09-30 15:54:26 +00:00
function move-website-files-to-target() {
(cd $BUILDDIR; dir=$(ls); cd $dir; rsync -ru --exclude-from "/etc/exclude.pattern" --delete resources/public/* $WEBSITEROOT;)
}