Update version_branch.yml
This commit is contained in:
8
.github/workflows/version_branch.yml
vendored
8
.github/workflows/version_branch.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEW_VERSION: ${{ github.event.inputs.new_version }}
|
NEW_VERSION: ${{ github.event.inputs.new_version }}
|
||||||
BASE_BRANCH: ${{ github.event.inputs.base_branch }}
|
BASE_BRANCH: ${{ github.event.inputs.base_branch }}
|
||||||
BRANCH_PREFIX: dev/
|
BRANCH_PREFIX: version/dev/
|
||||||
COMMIT_CHANGES: ${{ github.event.inputs.commit_changes }}
|
COMMIT_CHANGES: ${{ github.event.inputs.commit_changes }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -159,14 +159,14 @@ jobs:
|
|||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
trap 'echo "[FATAL] Collision defense failed at line $LINENO" >&2; echo "[FATAL] Last command: $BASH_COMMAND" >&2' ERR
|
trap 'echo "[FATAL] Collision defense failed at line $LINENO" >&2; echo "[FATAL] Last command: $BASH_COMMAND" >&2' ERR
|
||||||
|
|
||||||
# Git cannot create refs like dev/03.02.00 if a ref named dev already exists.
|
# Git cannot create refs like version/dev/03.02.00 if a ref named version already exists.
|
||||||
# This is a known enterprise failure mode. We fail fast with a deterministic diagnostic.
|
# This is a known enterprise failure mode. We fail fast with a deterministic diagnostic.
|
||||||
PREFIX_TOP="${BRANCH_PREFIX%%/*}"
|
PREFIX_TOP="${BRANCH_PREFIX%%/*}"
|
||||||
if git ls-remote --exit-code --heads origin "${PREFIX_TOP}" >/dev/null 2>&1; then
|
if git ls-remote --exit-code --heads origin "${PREFIX_TOP}" >/dev/null 2>&1; then
|
||||||
echo "[ERROR] Branch namespace collision detected" >&2
|
echo "[ERROR] Branch namespace collision detected" >&2
|
||||||
echo "[ERROR] A branch named '${PREFIX_TOP}' exists on origin, so '${BRANCH_PREFIX}<version>' cannot be created." >&2
|
echo "[ERROR] A branch named '${PREFIX_TOP}' exists on origin, so '${BRANCH_PREFIX}<version>' cannot be created." >&2
|
||||||
echo "[ERROR] Remediation options:" >&2
|
echo "[ERROR] Remediation options:" >&2
|
||||||
echo " - Change BRANCH_PREFIX to a non colliding namespace (example: version/dev/)" >&2
|
echo " - Change BRANCH_PREFIX to a non colliding namespace (example: release/dev/)" >&2
|
||||||
echo " - Rename the existing '${PREFIX_TOP}' branch (organizational policy permitting)" >&2
|
echo " - Rename the existing '${PREFIX_TOP}' branch (organizational policy permitting)" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@@ -335,7 +335,7 @@ jobs:
|
|||||||
header_re = re.compile(r'(?im)(VERSION[ ]*:[ ]*)([0-9]{2}[.][0-9]{2}[.][0-9]{2})')
|
header_re = re.compile(r'(?im)(VERSION[ ]*:[ ]*)([0-9]{2}[.][0-9]{2}[.][0-9]{2})')
|
||||||
|
|
||||||
# Joomla manifest targeting: only update XML files that look like extension manifests.
|
# Joomla manifest targeting: only update XML files that look like extension manifests.
|
||||||
manifest_marker_re = re.compile(r'(?is)<extension')
|
manifest_marker_re = re.compile(r'(?is)<extension\b')
|
||||||
xml_version_re = re.compile(r'(?is)(<version[ ]*>)([^<]*?)(</version[ ]*>)')
|
xml_version_re = re.compile(r'(?is)(<version[ ]*>)([^<]*?)(</version[ ]*>)')
|
||||||
xml_date_res = [
|
xml_date_res = [
|
||||||
re.compile(r'(?is)(<creationDate[ ]*>)([^<]*?)(</creationDate[ ]*>)'),
|
re.compile(r'(?is)(<creationDate[ ]*>)([^<]*?)(</creationDate[ ]*>)'),
|
||||||
|
|||||||
Reference in New Issue
Block a user