Skip to content

Commit

Permalink
chore(build): fix release-plugins script
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Jan 24, 2025
1 parent 01e565f commit 83e99ed
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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;

0 comments on commit 83e99ed

Please sign in to comment.