mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
ci: add hotfix oss console pipeline
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3221 GitOrigin-RevId: 8dc60862eb75e3988a7add72d9b7d33f20a62048
This commit is contained in:
parent
a3e042c9ba
commit
214191ab5c
@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
ROOT="${BASH_SOURCE[0]%/*}"
|
||||
|
||||
SEMVER_REGEX="v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?"
|
||||
CHANNEL_REGEX="^[a-z]+"
|
||||
LATEST_TAG=$(git describe --tags --abbrev=0)
|
||||
|
||||
VERSION=""
|
||||
channel="stable"
|
||||
|
||||
if [[ "$LATEST_TAG" =~ $SEMVER_REGEX ]]; then
|
||||
major=${BASH_REMATCH[1]}
|
||||
minor=${BASH_REMATCH[2]}
|
||||
release=${BASH_REMATCH[5]}
|
||||
if [[ "$release" =~ $CHANNEL_REGEX ]]; then
|
||||
channel="${BASH_REMATCH[0]}"
|
||||
fi
|
||||
if [[ ! -z "$EXPECTED_CHANNEL" ]] && [[ "${EXPECTED_CHANNEL}" != "${channel}" ]]; then
|
||||
exit
|
||||
fi
|
||||
VERSION="channel/$channel/v$major$minor"
|
||||
fi
|
||||
|
||||
if [ -z "$VERSION" ]; then VERSION="versioned/$($ROOT/get-version.sh)"; fi
|
||||
|
||||
echo $VERSION
|
Loading…
Reference in New Issue
Block a user