Skip to content

Commit

Permalink
fix(dry-run): fix dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejomon authored and oknozor committed Jan 24, 2025
1 parent 9f04182 commit f8c4784
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
commit specification but do not create any commit.
required: false
default: 'false'
dry-run:
description: Perform a release dry run
required: false
default: 'false'
profile:
description: Specify the bump profil to use for release
required: false
Expand All @@ -45,10 +49,6 @@ inputs:
description: Specify which package to use for release
required: false
default: ''
dry-run:
description: Perform a release dry run
required: false
default: 'false'

outputs:
version:
Expand Down Expand Up @@ -83,6 +83,6 @@ runs:
${{ inputs.git-user }} \
${{ inputs.git-user-email }} \
${{ inputs.verify }} \
${{ inputs.dry-run }} \
${{ inputs.profile }} \
${{ inputs.package }} \
${{ inputs.dry-run }}
23 changes: 5 additions & 18 deletions cog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RELEASE="${3}"
GIT_USER="${4}"
GIT_USER_EMAIL="${5}"
VERIFY="${6}"
PROFILE="${7}"
PACKAGE="${8}"
DRY_RUN="${9}"
DRY_RUN="${7}"
PROFILE="${8}"
PACKAGE="${9}"

echo "Setting git user : ${GIT_USER}"
git config --global user.name "${GIT_USER}"
Expand Down Expand Up @@ -56,22 +56,9 @@ if [ "$RELEASE" = "true" ]; then
fi

if [ "$DRY_RUN" = "true" ]; then
if [ "$PACKAGE" != '' ]; then
if [ "$PROFILE" != '' ]; then
echo "packge=${PACKAGE} profile=${PROFILE}"
cog bump --auto -H $PROFILE --package $PACKAGE --dry-run|| exit 1
else
cog bump --auto --package $PACKAGE --dry-run|| exit 1
fi
else
if [ "$PROFILE" != '' ]; then
echo "profile=${PROFILE}"
cog bump --auto -H $PROFILE --dry-run || exit 1
else
echo "dry run"
cog bump --auto --dry-run|| exit 1
fi
fi
VERSION="$(git describe --tags "$(git rev-list --tags --max-count=1)")"
VERSION="$(cog bump --auto --dry-run)"
echo "version=$VERSION" >>$GITHUB_OUTPUT
fi

Expand Down

0 comments on commit f8c4784

Please sign in to comment.