Fix BUILDDIR
This commit is contained in:
parent
bafc725bfa
commit
7cfb292b88
2 changed files with 4 additions and 3 deletions
2
pms-cli
2
pms-cli
|
@ -5,7 +5,7 @@ readonly PKGVER="0.0.2"
|
|||
readonly LICENSE="GNU AGPLv3"
|
||||
readonly ROOTPATH="$(dirname $(readlink -f $(which $0)))"
|
||||
readonly TEMPLATEDIR="${ROOTPATH}/.template"
|
||||
readonly BUILDDIR="${ROOTPATH}/image"
|
||||
readonly BUILDDIR="$(mktemp -d -p /tmp/pms-cli.XXXXXX)"
|
||||
readonly CONFIG="/usr/local/noveria/etc/pms-cli/pms-cli.json"
|
||||
|
||||
for util in ${ROOTPATH}/utils/*; do
|
||||
|
|
|
@ -73,13 +73,14 @@ function buildImage() {
|
|||
local app_name=$(curl -s "$4" | jq -r '.downloads.application.name')
|
||||
|
||||
log d "downloading server.jar"
|
||||
cp "${ROOTPATH}"/image/* "${BUILDDIR}/"
|
||||
curl "$4/downloads/$app_name" -o "${BUILDDIR}/server.jar"
|
||||
|
||||
log d "building docker image"
|
||||
podman build --rm "${BUILDDIR}" --tag "${2}/${1}:${3}"
|
||||
|
||||
log d "removing server.jar, if present"
|
||||
[[ -f "${BUILDDIR}/server.jar" ]] && rm -f "${BUILDDIR}/server.jar"
|
||||
log d "removing temporary build-dir"
|
||||
[[ -f "${BUILDDIR}" ]] && rm -rf "${BUILDDIR}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue