2022-09-23 13:39:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function get-and-unzip-website-data() {
|
2022-09-28 08:26:50 +00:00
|
|
|
curl -H "Authorization: token $AUTHTOKEN" -O $GITREPOURL # GITREPURL = https://your.gitea.host/api/v1/repos/<owner>/<repo>/archive/main.zip
|
2022-09-23 13:39:17 +00:00
|
|
|
mkdir $BUILDDIR
|
|
|
|
unzip main.zip -D $BUILDDIR
|
|
|
|
}
|
|
|
|
|
|
|
|
function build-and-extract-website() {
|
|
|
|
(cd $BUILDDIR; lein ring war; websiteartifactname=$(ls | grep -o *.war); unzip target/$websiteartifactname "WEB-INF/classes/public/*")
|
|
|
|
}
|
|
|
|
|
|
|
|
# set variables from environment
|
|
|
|
# read write zugriff sicherstellen
|
|
|
|
function move-website-files-to-target() {
|
2022-09-27 15:06:21 +00:00
|
|
|
rsync -ru --exclude-from "/etc/exclude.pattern" --delete WEB-INF/classes/public/* $TARGETDIR
|
2022-09-23 13:39:17 +00:00
|
|
|
}
|