Skip to content

Commit

Permalink
fix(cog.sh): fix white spaces ignored in sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejomon authored and oknozor committed Jan 28, 2025
1 parent 2b29139 commit e6dcde3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ runs:
- id: cog
shell: bash
run: |
${{ github.action_path }}/cog.sh \
${{ inputs.check }} \
${{ inputs.check-latest-tag-only }} \
${{ inputs.release }} \
${{ inputs.git-user }} \
${{ inputs.git-user-email }} \
${{ inputs.verify }} \
${{ inputs.dry-run }} \
${{ inputs.profile }} \
${{ inputs.package }} \
${{ github.action_path }}/cog.sh \
"${{ inputs.check }}" \
"${{ inputs.check-latest-tag-only }}" \
"${{ inputs.release }}" \
"${{ inputs.git-user }}" \
"${{ inputs.git-user-email }}" \
"${{ inputs.verify }}" \
"${{ inputs.dry-run }}" \
"${{ inputs.package }}" \
"${{ inputs.profile }}"
12 changes: 6 additions & 6 deletions cog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ GIT_USER="${4}"
GIT_USER_EMAIL="${5}"
VERIFY="${6}"
DRY_RUN="${7}"
PROFILE="${8}"
PACKAGE="${9}"
PACKAGE="${8}"
PROFILE="${9}"

echo "Setting git user : ${GIT_USER}"
git config --global user.name "${GIT_USER}"
Expand Down Expand Up @@ -42,19 +42,19 @@ fi

if [ "$DRY_RUN" = "true" ]; then
echo "dry run"
echo "a'${PROFILE}'a"
if [ "${PROFILE}" != ' ' ]; then
if [ "${PROFILE}" != '' ]; then
echo "WARNING: bump profiles are ignored in dry run"
fi
cog bump --auto --dry-run|| exit 1
cog bump --auto --dry-run || exit 1
VERSION="$(cog bump --auto --dry-run)"
echo "version=$VERSION" >>$GITHUB_OUTPUT
fi

if [ "$RELEASE" = "true" ]; then
if [ "$PACKAGE" != '' ]; then
echo "packge=${PACKAGE}"
if [ "$PROFILE" != '' ]; then
echo "packge=${PACKAGE} profile=${PROFILE}"
echo "profile=${PROFILE}"
cog bump --auto -H $PROFILE --package $PACKAGE || exit 1
else
cog bump --auto --package $PACKAGE || exit 1
Expand Down

0 comments on commit e6dcde3

Please sign in to comment.