Skip to content
Prev Previous commit
Next Next commit
fix typos
  • Loading branch information
cryptodev-2s committed Dec 14, 2023
commit df12ef2e8b88aaae11dd1a8aa6b52d98193d03a8
25 changes: 12 additions & 13 deletions scripts/update-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,28 @@

set -euo pipefail

# Check if the current directory is a Git repository
# Check if the current directory is a git repository
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "Not in a git repository."
exit 1
fi

# Get the current Git branch
# Get the current git branch
branch=$(git rev-parse --abbrev-ref HEAD)

# Check if if we are not i a release branch
# Check if current branch is not a release branch
if [[ ! $branch =~ ^release/ ]]; then
echo "Not in a release branch."
exit 1
else
# Get the current package name
if [[ $# -eq 0 ]]; then
echo "Missing package name."
exit 1
fi
fi

package_name="$1"
shift # remove package name from arguments
# Get the current package name
if [[ $# -eq 0 ]]; then
echo "Missing package name."
exit 1
fi

yarn auto-changelog update --tag-prefix "${package_name}@" --rc "$@"
package_name="$1"
shift # remove package name from arguments

fi
yarn auto-changelog update --tag-prefix "${package_name}@" --rc "$@"