Browse Source

identify_package_name: support *-repos for Jenkins job names

tags/v0.1.0
Michael Prokop 9 years ago
parent
commit
2df2e874c4
2 changed files with 18 additions and 10 deletions
  1. +9
    -5
      scripts/build-and-provide-package
  2. +9
    -5
      scripts/include-in-repos

+ 9
- 5
scripts/build-and-provide-package View File

@@ -59,12 +59,14 @@ bailout() {
}

identify_package_name() {
PACKAGE=${JOB_NAME%-binaries*}
BINARY_PACKAGE=${PACKAGE%-test*}
if [ -z "${PACKAGE:-}" ] ; then
bailout 1 "Error: could not identify Debian package name based on job name ${JOB_NAME:-}."
# make sure we get rid of 'repos' and 'binaries' from Jenkins job name
PACKAGE=${JOB_NAME%-repos*}
PACKAGE=${PACKAGE%-binaries*}

if [ -n "${PACKAGE:-}" ] ; then
echo "*** Identified Debian package name $PACKAGE ***"
else
echo "*** Building binary package $BINARY_PACKAGE ***"
bailout 1 "Error: could not identify Debian package name based on job name ${JOB_NAME:-}."
fi
}

@@ -93,6 +95,8 @@ build_info() {
echo "*** Using supplied repository name $REPOS ***"
else
REPOS="${JOB_NAME%-binaries*}"
REPOS="${REPOS%-repos*}"

if [ -z "${distribution:-}" ]; then
echo "*** No repository supplied, using repository name $REPOS ***"
else


+ 9
- 5
scripts/include-in-repos View File

@@ -54,12 +54,14 @@ get_base_directory() {
}

identify_package_name() {
PACKAGE=${JOB_NAME%-binaries*}
BINARY_PACKAGE=${PACKAGE%-test*}
if [ -z "${PACKAGE:-}" ] ; then
bailout 1 "Error: could not identify Debian package name based on job name ${JOB_NAME:-}."
# make sure we get rid of 'repos' and 'binaries' from Jenkins job name
PACKAGE=${JOB_NAME%-repos*}
PACKAGE=${PACKAGE%-binaries*}

if [ -n "${PACKAGE:-}" ] ; then
echo "*** Identified Debian package name $PACKAGE ***"
else
echo "*** Building binary package $BINARY_PACKAGE ***"
bailout 1 "Error: could not identify Debian package name based on job name ${JOB_NAME:-}."
fi
}

@@ -69,6 +71,8 @@ build_info() {
echo "*** Using supplied repository name $REPOS ***"
else
REPOS="${JOB_NAME%-binaries*}"
REPOS="${REPOS%-repos*}"

if [ -z "${distribution:-}" ]; then
echo "*** No repository supplied, using repository name $REPOS ***"
else


Loading…
Cancel
Save