Skip to content

Commit 1ac1b52

Browse files
committed
[Breaking Change] (config) Add command lines to configure user info.
1 parent 8a9bd69 commit 1ac1b52

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/ci/build_git-tag_or_create_github-release.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ fi
124124
Current_Branch=$(git branch --list | cat | grep -E '\* ([a-zA-Z0-9]{1,16})' | grep -E -o '([a-zA-Z0-9]{1,16})')
125125
echo "🔎 🌳 Current git branch: $Current_Branch"
126126

127+
git config --global user.name "Chisanan232"
128+
git config --global user.email "chi10211201@cycu.org.tw"
129+
git_global_username=$(git config --global user.name)
130+
git_global_user_email=$(git config --global user.email)
131+
echo "🔎 🌳 Current git name: $git_global_username"
132+
echo "🔎 🌳 Current git email: $git_global_user_email"
127133

128134
declare Tag_Version # This is the return value of function 'get_latest_version_by_git_tag'
129135
get_latest_version_by_git_tag() {
@@ -181,8 +187,6 @@ build_git_tag_or_github_release() {
181187
echo " 🔍👀 [DEBUG MODE] Build git tag $New_Release_Tag in git branch '$Current_Branch'."
182188
else
183189
git tag -a "$New_Release_Tag" -m "$New_Release_Tag"
184-
git config --global user.email "chi10211201@cycu.org.tw"
185-
git config --global user.name "Chisanan232"
186190
git push -u origin --tags
187191
fi
188192
echo "🎉 🍻 🌳 🏷 Build git tag which named '$New_Release_Tag' with current branch '$Current_Branch' successfully!"

0 commit comments

Comments
 (0)