Skip to content

Commit

Permalink
improved version definition security for conda-build workflows ↪️
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas.gehrig committed Dec 5, 2023
1 parent c041a7e commit 28ec691
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,16 @@ jobs:
KARABO_TAG=${{ inputs.version }}
pip install versioneer
VERSIONEER_VERSION=$(python -c 'import versioneer; print(versioneer.get_version())')
if [[ "$VERSIONEER_VERSION" == *"+"* ]] && [[ "$KARABO_TAG" != *"$DEV_STR"* ]]; then
echo "Dirty version needs to be a PEP440 conform dev-version"
exit 2
if [[ "$VERSIONEER_VERSION" == *"+"* ]]; then
if [[ "$KARABO_TAG" != *"$DEV_STR"* ]]; then
echo "Dirty version needs to be a PEP440 conform dev-version"
exit 2
fi
else
if [[ "$KARABO_TAG" != *"$VERSIONEER_VERSION"* ]]; then
echo "Provided version doesn't match the actual version"
exit 2
fi
fi
else
echo "Not specified github-event occured"
Expand Down

0 comments on commit 28ec691

Please sign in to comment.