Skip to content

Commit b2dc362

Browse files
committed
Fix: Restore update-site.sh
1 parent be4c91d commit b2dc362

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

helpers/update-site.sh

+3-22
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,12 @@ update_website() {
3636
# Move to temp folder
3737
cd "$TMP_DIR"
3838

39-
declare -r masterBranch="refs/heads/master"
40-
declare slot=""
41-
declare user=""
42-
declare password=""
43-
declare message=""
44-
45-
if [ "$masterBranch" == "$BRANCH" ]; then
46-
slot="sonarwhal-staging"
47-
user=$GIT_USER_NAME
48-
password=$GIT_PASSWORD
49-
message="Hey server, this content is for you! ***NO_CI***"
50-
else
51-
slot="sonarwhal-scanner-staging"
52-
user=$GIT_SCANNER_USER
53-
password=$GIT_SCANNER_PASSWORD
54-
message="Hey staging server, this content is for you! ***NO_CI***"
55-
fi
56-
57-
5839
git config --global user.email "$GIT_USER_EMAIL" \
59-
&& git config --global user.name "$user" \
40+
&& git config --global user.name "$GIT_USER_NAME" \
6041
&& git init \
6142
&& git add -A \
62-
&& git commit --message "$message" \
63-
&& git push --quiet --force --set-upstream "https://$user:$password@$slot.scm.azurewebsites.net:443/sonarwhal.git" master
43+
&& git commit --message "Hey server, this content is for you! ***NO_CI***" \
44+
&& git push --quiet --force --set-upstream "https://$GIT_USER_NAME:$GIT_PASSWORD@sonarwhal-staging.scm.azurewebsites.net:443/sonarwhal.git" master
6445
}
6546

6647
remove_sensitive_information() {

0 commit comments

Comments
 (0)