Browse Source

trunk_release: support skipping inclusion of packages in $TRUNK_RELEASE via IGNORE_RELEASE_TRUNK

If you want to have TRUNK_RELEASE enabled by default but skipping certain
builds, e.g. if you're building tagged or branch builds then you can easily
skip inclusion of such builds using something like:

  case "$branch" in tags/*|branches/*) export IGNORE_RELEASE_TRUNK=true;; esac
merge-requests/109/head
Michael Prokop 10 years ago
parent
commit
390271038a
  1. 20
      scripts/build-and-provide-package
  2. 22
      scripts/include-in-repos

20
scripts/build-and-provide-package

@ -340,14 +340,20 @@ reprepro_wrapper() {
}
trunk_release() {
# setting TRUNK_RELEASE=true enables release-trunk repository,
# to always get a copy of the package(s) to a central place
if [ -n "${TRUNK_RELEASE:-}" ] ; then
generate-reprepro-codename "$TRUNK_RELEASE"
# setting TRUNK_RELEASE=true enables release-trunk repository,
# to always get a copy of the package(s) to a central place
if [ -z "${TRUNK_RELEASE:-}" ] ; then
echo "*** TRUNK_RELEASE is not enabled ***"
elif [ "${IGNORE_RELEASE_TRUNK:-}" = "true" ] ; then
echo "*** IGNORE_RELEASE_TRUNK is set, ignoring request to add package(s) to $TRUNK_RELEASE repos ***"
else
echo "*** TRUNK_RELEASE is enabled ($TRUNK_RELEASE) ***"
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 --ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."
fi
generate-reprepro-codename "$TRUNK_RELEASE"
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 --ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."
fi
}
release_repos() {

22
scripts/include-in-repos

@ -154,14 +154,20 @@ reprepro_wrapper() {
}
trunk_release() {
# setting TRUNK_RELEASE=true enables release-trunk repository,
# to always get a copy of the package(s) to a central place
if [ -n "${TRUNK_RELEASE:-}" ] ; then
generate-reprepro-codename "$TRUNK_RELEASE"
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 --ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."
fi
# setting TRUNK_RELEASE=true enables release-trunk repository,
# to always get a copy of the package(s) to a central place
if [ -z "${TRUNK_RELEASE:-}" ] ; then
echo "*** TRUNK_RELEASE is not enabled ***"
elif [ "${IGNORE_RELEASE_TRUNK:-}" = "true" ] ; then
echo "*** IGNORE_RELEASE_TRUNK is set, ignoring request to add package(s) to $TRUNK_RELEASE repos ***"
else
echo "*** TRUNK_RELEASE is enabled ($TRUNK_RELEASE) ***"
generate-reprepro-codename "$TRUNK_RELEASE"
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" --waitforlock 1000 --ignore=wrongdistribution copymatched "$TRUNK_RELEASE" "$REPOS" '*'
[ $? -eq 0 ] || bailout 1 "Error: Failed to copy packages from ${REPOS} to ${TRUNK_RELEASE}."
fi
}
release_repos() {

Loading…
Cancel
Save