You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c4k-website/infrastructure/c4k-website-build/image/resources/functions.sh

18 lines
643 B
Bash

#!/bin/bash
function get-and-unzip-website-data() {
curl -H "Authorization: token $AUTHTOKEN" -O $REPOZIPURL # REPOZIPURL = https://your.gitea.host/api/v1/repos/<owner>/<repo>/archive/main.zip
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() {
rsync -ru --exclude-from "/etc/exclude.pattern" --delete WEB-INF/classes/public/* $TARGETDIR
}