-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): fix release-plugins script
- Loading branch information
1 parent
01e565f
commit 83e99ed
Showing
1 changed file
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
# OPTIONS: | ||
# --release-version <version> Specify the release version (required) | ||
# --next-version <version> Specify the next version (required) | ||
# --dry-un Specify to run in DRY_RUN. | ||
# --dry-run Specify to run in DRY_RUN. | ||
# -y, --yes Automatically confirm prompts (non-interactive). | ||
# -h, --help Show the help message and exit | ||
|
||
|
@@ -142,13 +142,14 @@ fi | |
# Main | ||
############################################################### | ||
mkdir -p $WORKING_DIR | ||
cd $WORKING_DIR; | ||
|
||
COUNTER=1; | ||
for PLUGIN in "${PLUGINS_ARRAY[@]}" | ||
do | ||
cd $WORKING_DIR; | ||
|
||
echo "---------------------------------------------------------------------------------------" | ||
echo "[$COUNTER/$PLUGINS_COUNT]Release Plugin: $PLUGIN" | ||
echo "[$COUNTER/$PLUGINS_COUNT] Release Plugin: $PLUGIN" | ||
echo "---------------------------------------------------------------------------------------" | ||
if [[ -z "${GITHUB_PAT}" ]]; then | ||
git clone [email protected]:kestra-io/$PLUGIN | ||
|
@@ -157,18 +158,28 @@ do | |
git clone https://${GITHUB_PAT}@github.com/kestra-io/$PLUGIN.git | ||
fi | ||
cd "$PLUGIN"; | ||
git checkout "$GIT_BRANCH"; | ||
|
||
if [[ "$PLUGIN" == "plugin-transform" ]] && [[ "$GIT_BRANCH" == "master" ]]; then # quickfix | ||
git checkout main; | ||
else | ||
git checkout "$GIT_BRANCH"; | ||
fi | ||
|
||
if [[ "$DRY_RUN" == false ]]; then | ||
echo "Run gradle release" | ||
echo "Run gradle release for plugin: $PLUGIN " | ||
if [[ "$AUTO_YES" == false ]]; then | ||
askToContinue | ||
fi | ||
echo "Branch: $(git rev-parse --abbrev-ref HEAD)"; | ||
./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion="${RELEASE_VERSION}" -Prelease.newVersion="${NEXT_VERSION}" | ||
git push | ||
./gradlew release -Prelease.useAutomaticVersion=true \ | ||
-Prelease.releaseVersion="${RELEASE_VERSION}" \ | ||
-Prelease.newVersion="${NEXT_VERSION}" | ||
git push; | ||
sleep 5; # add a short delay to not spam Maven Central | ||
else | ||
echo "Skip gradle release [DRY_RUN=false]" | ||
echo "Skip gradle release [DRY_RUN=true]"; | ||
fi | ||
COUNTER=$(( COUNTER + 1 )); | ||
sleep 5 # add a short delay to not spam Maven Central | ||
done; | ||
|
||
exit 0; | ||
exit 0; |