Skip to content

Commit f6ce9af

Browse files
committed
Added generateChangelogTask ro release script
1 parent bea1dbd commit f6ce9af

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

etc/scripts/release.sh

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ set -e
33

44
# The path to a directory where the code will be checked out and the assemblies would be generated. For example: /home/user/build. Required.
55
BUILD_DIRECTORY=$1
6-
GIT_HUB_TOKEN=$2
7-
GIT_HUB_READ_ONLY_TOKEN=$3
8-
GIT_HUB_EMAIL=$4
6+
GITHUB_WRITE_TOKEN=$2
7+
GITHUB_READ_TOKEN=$3
8+
GITHUB_EMAIL=$4
99

1010
# Whether the source code and assemblies on the build directory should be cleaned or not
1111
CLEAN=false
@@ -34,9 +34,9 @@ then
3434
exit 1;
3535
fi
3636

37-
if [ -z "$GIT_HUB_TOKEN" ]
37+
if [ -z "$GITHUB_WRITE_TOKEN" ]
3838
then
39-
echo "[ERROR] The GIT_HUB_TOKEN parameter is required"
39+
echo "[ERROR] The GITHUB_WRITE_TOKEN parameter is required"
4040
exit 1;
4141
fi
4242

@@ -56,7 +56,7 @@ then
5656
git clone [email protected]:$REPOSITORY_OWNER/$PROJECT_NAME.git $PROJECT_NAME
5757
fi
5858
cd $PROJECT_HOME
59-
git config user.email $GIT_HUB_EMAIL
59+
git config user.email $GITHUB_EMAIL
6060

6161
# ************************
6262
# Synch production branch
@@ -70,24 +70,12 @@ git pull
7070
VERSION=`./gradlew :printVersion -q --configure-on-demand -PSNAPSHOT=false`
7171

7272
# ************************
73-
# Close Milestone & Upload Release on GitHub
74-
# ************************
75-
76-
./gradlew :closeGitHubMilestone :createGitHubRelease --configure-on-demand -PSNAPSHOT=false -PREPOSITORY_OWNER=$REPOSITORY_OWNER -PREPOSITORY_NAME=$PROJECT_NAME -PGITHUB_OATH_TOKEN=$GIT_HUB_TOKEN
77-
78-
# ************************
73+
# Close Milestone on GitHub
74+
# Upload Release on GitHub
7975
# Generate Change Log
8076
# ************************
8177

82-
github_changelog_generator --no-unreleased --no-pull-requests --no-pr-wo-labels --exclude-labels task -t $GIT_HUB_READ_ONLY_TOKEN
83-
84-
git add CHANGELOG.md
85-
git commit -m "Updated CHANGELOG.md"
86-
git diff HEAD
87-
88-
read -p "Please verify the $PROJECT_HOME/CHANGELOG.md and press [Enter] key to continue..."
89-
90-
git push origin HEAD:production
78+
./gradlew :closeGitHubMilestone :createGitHubRelease :generateChangelogTask --configure-on-demand --refresh-dependencies -PSNAPSHOT=false -PREPOSITORY_OWNER=$REPOSITORY_OWNER -PREPOSITORY_NAME=$PROJECT_NAME -PGITHUB_WRITE_TOKEN=$GITHUB_WRITE_TOKEN -PGITHUB_READ_TOKEN=$GITHUB_READ_TOKEN
9179

9280
# ************************
9381
# Deploy to Sonatype repository

0 commit comments

Comments
 (0)