-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b95f996
commit f112720
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,18 @@ CHART_YAML="./deploy/helm-chart/kubernetes-replicator/Chart.yaml" | |
TRAVIS_TAG="${TRAVIS_TAG:-v0.0.0}" | ||
GITHUB_TOKEN="${GITHUB_TOKEN:-dummy}" | ||
|
||
## temp working vars | ||
TIMESTAMP="$(date +%s )" | ||
TMP_DIR="/tmp/${TIMESTAMP}" | ||
|
||
## set up Git-User | ||
git config --global user.name "Mittwald Machine" | ||
git config --global user.email "[email protected]" | ||
|
||
## temporary clone git repository | ||
git clone "https://${GIT_REPOSITORY}" "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
|
||
## replace appVersion | ||
sed -i "s#appVersion:.*#appVersion: ${TRAVIS_TAG}#g" "${CHART_YAML}" | ||
|
||
|
@@ -24,15 +36,11 @@ sed -i "s#version:.*#version: ${TRAVIS_TAG/v/}#g" "${CHART_YAML}" | |
## useful for debugging purposes | ||
git status | ||
|
||
## set up Git-User | ||
git config --global user.name "Mittwald Machine" | ||
git config --global user.email "[email protected]" | ||
|
||
## Add new remote with credentials baked in url | ||
git remote add publisher "https://mittwald-machine:${GITHUB_TOKEN}@${GIT_REPOSITORY}" | ||
|
||
## add and commit changed file | ||
git add "${CHART_YAML}" | ||
git add -A | ||
|
||
## useful for debugging purposes | ||
git status | ||
|