Compare commits
17 Commits
release/7.
...
v1.2.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f3d75c010 | ||
|
|
718926c776 | ||
|
|
21129c90a8 | ||
|
|
61d3055e77 | ||
|
|
4c44f1682f | ||
|
|
ead4715425 | ||
|
|
ceb331236f | ||
|
|
efb5140d5b | ||
|
|
675e60a9d3 | ||
|
|
eda31c222d | ||
|
|
85bb6c2ad2 | ||
|
|
ecd72cb678 | ||
|
|
56c654ac50 | ||
|
|
d8676bfa36 | ||
|
|
bce25f7840 | ||
|
|
32a0c2d240 | ||
|
|
fda37b8b20 |
37
.github/workflows/exp.yml
vendored
37
.github/workflows/exp.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
fetch-depth: 2 # get parent
|
||||||
|
|
||||||
- name: Report
|
- name: Report
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -37,31 +38,51 @@ jobs:
|
|||||||
VERSION=${BRANCH#release/}
|
VERSION=${BRANCH#release/}
|
||||||
if [ "$VERSION" != "$BRANCH" ]; then
|
if [ "$VERSION" != "$BRANCH" ]; then
|
||||||
echo "Triggered by commit in version $VERSION release branch $BRANCH"
|
echo "Triggered by commit in version $VERSION release branch $BRANCH"
|
||||||
git fetch origin wip-$VERSION:wip-$VERSION
|
git fetch origin refs/tags/v$VERSION:refs/tags/v$VERSION
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Tag v$VERSION does not exist"
|
echo "Tag v$VERSION does not exist"
|
||||||
else
|
else
|
||||||
TAGSHA=$(git rev-parse wip-$VERSION)
|
TAGSHA=$(git rev-parse v$VERSION)
|
||||||
echo "FOUND TAG $TAGSHA"
|
echo "FOUND TAG $TAGSHA"
|
||||||
if [ "$TAGSHA" != "${{ github.sha }}" ]; then
|
if [ "$TAGSHA" != "${{ github.sha }}" ]; then
|
||||||
echo "TAG v$VERSION exists on another commit : error"
|
echo "::error::TAG v$VERSION exists on another commit (${{ github.sha }}) : error"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Tag v$VERSION exists on this commit: nothing to do here"
|
echo "Tag v$VERSION exists on this commit: nothing to do here"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Triggered by commit in non-release branch $BRANCH: error"
|
echo "::error::Triggered by commit in non-release branch $BRANCH: error"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=${REF#refs/tags/}"
|
HZTAG=${REF#refs/tags/}
|
||||||
if [ "$TAG" != "$REF" ]; then
|
if [ "$HZTAG" != "$REF" ]; then
|
||||||
echo "Triggered by tag $TAG"
|
HZVERSION=${HZTAG#v}
|
||||||
|
if [ "$HZVERSION" != "$HZTAG" ]; then # it is a version tag
|
||||||
|
echo "Triggered by version tag $HZTAG"
|
||||||
|
git fetch origin refs/heads/release/$HZVERSION:refs/heads/release/$HZVERSION
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "::error::Branch release/$HZVERSION does not exist"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
HZBRANCHSHA=$(git rev-parse release/$HZVERSION)
|
||||||
|
HZPARENTSHA=$(git rev-parse $HZTAG^1)
|
||||||
|
if [ "$HZBRANCHSHA" != "$HZPARENTSHA" ]; then
|
||||||
|
echo "::error::Tag parent is not HEAD of release/$HZVERSION but $HZPARENTSHA"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Tag parent is HEAD of release/$HZVERSION, proceed"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "::error::Triggered by non-version tag $HZTAG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "ERR"
|
echo "::error::I am confused"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user