Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="{{{gitHost}}}"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="{{{gitUserId}}}"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="{{{gitRepoId}}}"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="{{{releaseNote}}}"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
31 changes: 14 additions & 17 deletions samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
31 changes: 14 additions & 17 deletions samples/client/echo_api/go-external-refs/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
31 changes: 14 additions & 17 deletions samples/client/echo_api/go/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
31 changes: 14 additions & 17 deletions samples/client/echo_api/java/apache-httpclient/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
31 changes: 14 additions & 17 deletions samples/client/echo_api/java/feign-gson/git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ git_repo_id=$2
release_note=$3
git_host=$4

if [ "$git_host" = "" ]; then
if [ -z "${git_host}" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}"
fi

if [ "$git_user_id" = "" ]; then
if [ -z "${git_user_id}" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}"
fi

if [ "$git_repo_id" = "" ]; then
if [ -z "${git_repo_id}" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}"
fi

if [ "$release_note" = "" ]; then
if [ -z "${release_note}" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}"
fi

# Initialize the local directory as a Git repository
Expand All @@ -35,19 +35,16 @@ git init
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
git commit -m "${release_note}"

# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
if [ -z "$(git remote)" ]; then # git remote not defined
if [ -z "${GIT_TOKEN:-}" ]; then
echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment."
git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git"
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git"
fi

fi

git pull origin master
Expand Down
Loading
Loading