From df14cb0514bf51e7e08d255238470c175eadb435 Mon Sep 17 00:00:00 2001 From: Ralf Jung <post@ralfj.de> Date: Sat, 24 Mar 2018 14:07:24 +0100 Subject: [PATCH] we can't use variables in 'only:', so go back to OPAM_PKG_BRANCH --- buildjob | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/buildjob b/buildjob index 41d437f..216308c 100755 --- a/buildjob +++ b/buildjob @@ -3,12 +3,10 @@ set -e #set -x ## This runs a default build job. The following variables are noteworthy: -## - $MAIN_BRANCH: The "main branch" this current branch comes from (usually -## master) ## - $OPAM_PINS: Space-separated list of packages to pin in opam, in the format ## "PACKAGE KIND TARGET PACKAGE KIND TARGET ..." ## - $VALIDATE: If non-empty, run `make validate` -## - $OPAM_PKG, $OPAM_UPDATE_SECRET: IF $OPAM_PKG is +## - $OPAM_PKG, $OPAM_UPDATE_SECRET, $OPAM_PKG_BRANCH: IF $OPAM_PKG is ## non-empty, release this commit as a new package on opam when done. ## Requires the $OPAM_UPDATE_SECRET variable to be set. This only happens if ## the current branch is $OPAM_PKG_BRANCH, or master if that variable is @@ -55,7 +53,7 @@ if [[ -n "$TIMING_PROJECT" && -n "$TIMING_CONF" ]]; then fi # maybe create opam package -if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "$MAIN_BRANCH" ]]; then +if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "${OPAM_PKG_BRANCH:-master}" ]]; then echo_color "$BOLDGREEN" "[buildjob] Releasing package on opam" # check if we have the secret if [[ -z "$OPAM_UPDATE_SECRET" ]]; then -- GitLab