diff --git a/utils/build-galaxy-release.sh b/utils/build-galaxy-release.sh index 3f92f5d6307052b0d2c7272859ae70844750f074..1e4f8832a1fe612fa67281673b6a33b0c54a723a 100755 --- a/utils/build-galaxy-release.sh +++ b/utils/build-galaxy-release.sh @@ -19,6 +19,7 @@ be givedn without the other one. Options: -a Add all files, no only files known to git repo -k Keep build directory + -i Install the generated collection -h Print this help EOF @@ -26,7 +27,8 @@ EOF all=0 keep=0 -while getopts "ahk" arg; do +install=0 +while getopts "ahki" arg; do case $arg in a) all=1 @@ -38,6 +40,9 @@ while getopts "ahk" arg; do k) keep=1 ;; + i) + install=1 + ;; \?) echo usage @@ -70,7 +75,7 @@ if [ -z "$galaxy_version" ]; then exit 1 fi -echo "Builing galaxy release: ${namespace}-${collection}-${galaxy_version}" +echo "Building collection: ${namespace}-${collection}-${galaxy_version}" GALAXY_BUILD=".galaxy-build" @@ -182,3 +187,8 @@ if [ $keep == 0 ]; then else echo "Keeping build dir $GALAXY_BUILD" fi + +if [ $install == 1 ]; then + echo "Installing collection ${namespace}-${collection}-${galaxy_version}.tar.gz ..." + ansible-galaxy collection install "${namespace}-${collection}-${galaxy_version}.tar.gz" --force +fi