adding the changes

Signed-off-by: rajdas <mail.rajdas@gmail.com>
This commit is contained in:
rajdas
2019-09-25 17:33:12 +05:30
parent 69f6dc4168
commit 9d5528b106
5 changed files with 11 additions and 14 deletions

View File

@@ -3,14 +3,14 @@
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
git remote set-url origin https://${GITHUB_TOKEN}@github.com/rajdas98/community-charts.git > /dev/null 2>&1
git remote set-url origin https://${GITHUB_TOKEN}@github.com/litmuschaos/community-charts.git > /dev/null 2>&1
}
commit_website_files() {
commit_updated_changes() {
git checkout master
git status
git add .
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
git commit --message " $TRAVIS_BUILD_NUMBER: version upgraded for chaos-charts"
git status
}

View File

@@ -6,6 +6,8 @@ regex = "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-
result = re.search(regex, sys.argv[1])
if result:
print("version validation successful")
sys.exit(0) # on success
else:
print("version validation failed")
sys.exit(1) #on failure

View File

@@ -32,6 +32,7 @@ do
eval $(yaml $file)
kind=$kind
# check if kind is chaosexperiment or ChartServiceVersion
if [ $kind == "ChaosExperiment" ]; then
newversion=$metadata_version
elif [ $kind == "ChartServiceVersion" ]; then
@@ -39,10 +40,10 @@ do
fi
# if version is interger or float (semversion)
result=sudo python scripts/semversion_checker.py $newversion
sudo python scripts/validate_version.py $newversion
if [ $? == 0 ]; then
temp=$(echo ${file::-18})
if [ $kind == "ChartServiceVersion" ]; then
# echo $temp
oldversionfile=$temp'.yaml'
@@ -66,10 +67,6 @@ do
`sed -i "s/$oldversion/$newversion/" $oldversionfile`
`sed -i "s/version:[[:space:]]*$oldversion/version: {{ VERSION }}/" $file`
fi
fi
done
done