Commit dac37b15 authored by Ralf Jung's avatar Ralf Jung

use MAIN_BRANCH variable

parent 0428c58a
......@@ -3,10 +3,12 @@ set -e
#set -x
## This runs a default build job. The following variables are noteworthy:
## - $OPAM_PINS: Space-separated list of packages to pin in opam, in the format
## - $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_UPDATE_SECRET, $OPAM_PKG, $OPAM_PKG_BRANCH: IF $OPAM_PKG is
## - $OPAM_UPDATE_SECRET, $OPAM_PKG: 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
......@@ -31,10 +33,7 @@ if [[ -n "$VALIDATE" ]]; then
fi
# maybe create opam package
if [[ -z "$OPAM_PKG_BRANCH" ]]; then
OPAM_PKG_BRANCH=master
fi
if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "$OPAM_PKG_BRANCH" ]]; then
if [[ -n "$OPAM_PKG" && "$CI_COMMIT_REF_NAME" == "$MAIN_BRANCH" ]]; then
echo_color "$BOLDGREEN" "[buildjob] Releasing package on opam"
# determine package name prefix
if [[ "$CI_COMMIT_REF_NAME" == master ]]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment