Skip to content

Commit

Permalink
fix(ci): update scripts/workflows for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Jan 30, 2025
1 parent 3b65a6a commit ab3ecaf
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
with:
fetch-depth: 0

# Setup build
- uses: ./actions/.github/actions/setup-build
id: build
with:
java-enabled: true
node-enabled: true
caches-enabled: true

# Get Plugins List
- name: Get Plugins List
uses: ./.github/actions/plugins-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
with:
fetch-depth: 0

# Setup build
- uses: ./actions/.github/actions/setup-build
id: build
with:
java-enabled: true
node-enabled: true
caches-enabled: true

# Get Plugins List
- name: Get Plugins List
uses: ./.github/actions/plugins-list
Expand Down
13 changes: 12 additions & 1 deletion release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# OPTIONS:
# --release-version <version> Specify the release version (required)
# --next-version <version> Specify the next version (required)
# --plugin-file <file> Specify the file listing plugins (default: .plugins).
# --dry-run Specify to run in DRY_RUN.
# -y, --yes Automatically confirm prompts (non-interactive).
# -h, --help Show the help message and exit
Expand All @@ -19,7 +20,8 @@
# ./release-plugins.sh --release-version=0.20.0 --next-version=0.21.0-SNAPSHOT
# To release a specific plugin:
# ./release-plugins.sh --release-version=0.20.0 --next-version=0.21.0-SNAPSHOT plugin-kubernetes

# To release specific plugins from a plugin-file:
# ./release-plugins.sh --release-version=0.20.0 --next-version=0.21.0-SNAPSHOT --plugin-file .plugins
#===============================================================================

set -e;
Expand All @@ -43,6 +45,7 @@ usage() {
echo "Options:"
echo " --release-version <version> Specify the release version (required)."
echo " --next-version <version> Specify the next version (required)."
echo " --plugin-file <file> Specify the file listing plugins (default: .plugins)."
echo " --dry-run Specify to run in DRY_RUN."
echo " -y, --yes Automatically confirm prompts (non-interactive)."
echo " -h, --help Show this help message and exit."
Expand Down Expand Up @@ -85,6 +88,14 @@ while [[ "$#" -gt 0 ]]; do
DRY_RUN=true
shift
;;
--plugin-file)
PLUGIN_FILE="$2"
shift 2
;;
--plugin-file=*)
PLUGIN_FILE="${1#*=}"
shift
;;
-y|--yes)
AUTO_YES=true
shift
Expand Down
16 changes: 13 additions & 3 deletions tag-release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# ./tag-release-plugins.sh --release-version=0.20.0
# To release a specific plugin:
# ./tag-release-plugins.sh --release-version=0.20.0 plugin-kubernetes

# To release specific plugins from a plugin-file:
# ./release-plugins.sh --release-version=0.20.0 --plugin-file .plugins
#===============================================================================

set -e;
Expand All @@ -40,6 +41,7 @@ usage() {
echo
echo "Options:"
echo " --release-version <version> Specify the release version (required)."
echo " --plugin-file <file> Specify the file listing plugins (default: .plugins)."
echo " --dry-run Specify to run in DRY_RUN."
echo " -y, --yes Automatically confirm prompts (non-interactive)."
echo " -h, --help Show this help message and exit."
Expand Down Expand Up @@ -74,6 +76,14 @@ while [[ "$#" -gt 0 ]]; do
DRY_RUN=true
shift
;;
--plugin-file)
PLUGIN_FILE="$2"
shift 2
;;
--plugin-file=*)
PLUGIN_FILE="${1#*=}"
shift
;;
-y|--yes)
AUTO_YES=true
shift
Expand Down Expand Up @@ -147,7 +157,7 @@ do

cd "$PLUGIN";

git checkout $RELEASE_BRANCH;
git checkout "$RELEASE_BRANCH";

if [[ "$DRY_RUN" == false ]]; then
CURRENT_BRANCH=$(git branch --show-current);
Expand All @@ -163,7 +173,7 @@ do
git checkout "$RELEASE_BRANCH";

# Update version
sed -i.bak "s/^version=.*/version=$RELEASE_VERSION/" ./gradle.properties
sed -i "s/^version=.*/version=$RELEASE_VERSION/" ./gradle.properties
git add ./gradle.properties
git commit -m"chore(version): update to version 'v$RELEASE_VERSION'."
git push
Expand Down

0 comments on commit ab3ecaf

Please sign in to comment.