1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-22 12:22:06 +01:00

Rename pgpainless run script and fix parameter passing

This commit is contained in:
Paul Schaub 2021-07-15 17:22:39 +02:00
parent 8cf5347b52
commit f662a3dba9
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 12 additions and 1 deletions

View file

@ -63,4 +63,11 @@ jar {
}
}
run {
// https://discuss.gradle.org/t/how-can-i-provide-command-line-args-to-application-started-with-gradle-run/6474/5
if (project.hasProperty("appArgs")) {
args Eval.me(appArgs)
}
}
tasks."jar".dependsOn(":pgpainless-core:assemble")

View file

@ -15,4 +15,8 @@ popd > /dev/null
BASEDIR="$(cd ${SCRIPTDIR}/.. && pwd)"
exec "${BASEDIR}/gradlew" run --quiet --args="${@}"
# https://discuss.gradle.org/t/how-can-i-provide-command-line-args-to-application-started-with-gradle-run/6474/5
printf -v var "'%s', " "$@"
var=${var%??}
exec "${BASEDIR}/gradlew" run --quiet -PappArgs="[$var]"