run-tarball/puppet: fix module name for -tarball jobs

Fix the regex that find the actual Puppet module name.

Change-Id: I0fb69aee716114bc789440b1a6a60ca4dd86cf00
This commit is contained in:
Emilien Macchi 2016-04-22 16:29:25 -04:00
parent 872b90e38b
commit b60950913f

View File

@ -17,8 +17,9 @@
# this is a puppet module
if [ -r metadata.json ]; then
# try to find the modulename, ex: puppet-aodh
# we have to use sed because workspace is puppet-aodh-branch-tarball and not puppet-aodh.
MODULE_NAME=$(basename `git rev-parse --show-toplevel` | sed "s/-branch-tarball$//")
# we have to use sed because workspace is puppet-aodh-branch-tarball
# or puppet-aodh-tarball and not puppet-aodh.
MODULE_NAME=$(basename `git rev-parse --show-toplevel` | sed "s/\(-branch\)\?-tarball$//")
puppet module build .
mkdir -p dist
mv pkg/*.tar.gz dist/$MODULE_NAME.tar.gz