Commit 9c69a3f4 authored by scuq's avatar scuq

release script for osx/lin

parent 6e1cc685
Pipeline #368 passed with stage
in 49 seconds
......@@ -12,4 +12,6 @@ scripts/*
!scripts/compile_osx.sh
!scripts/compile_prompt.bat
!scripts/release.bat
!scripts/release.sh
!scripts/set_version.bat
!scripts/set_version.sh
#!/bin/bash
ACCESSTOKEN=$(cat ../accesstoken.txt | tr -d ' ')
SHORTYEAR=$(cat ../aic/MAJOR.ver | tr -d ' ')
MONTH=$(cat ../aic/MINOR.ver | tr -d ' ')
DAY=$(cat ../aic/PATCH.ver | tr -d ' ')
HOURMINUTE=$(cat ../aic/BUILD.ver | tr -d ' ')
VERSION="$SHORTYEAR.$MONTH.$DAY.$HOURMINUTE"
#copy ..\build\aic\aic-%version%-win64.exe ..\releases\
cd ../
git add releases/*
git commit -m "added release assets for version $VERSION"
git push origin master
createreleaseurl="https://git.abyle.org/api/v4/projects/146/releases"
createreleasedata="
{
\"name\": \"v$VERSION\",
\"tag_name\": \"v$VERSION\",
\"description\": \"v$VERSION\",
\"description_html\": \"v$VERSION\",
\"assets\": {
\"links\": [
{
\"name\": \"homepage\",
\"url\": \"https://git.abyle.org/scuq/aic/\"
}
]
}
}
"
cd scripts/
cd ..
git commit -m "commit before tag version $VERSION"
git tag -a v$VERSION -m "version $VERSION"
git push origin v$VERSION
response=$(curl --request POST $createreleaseurl \
--silent \
--header "Content-Type: application/json" \
--header "PRIVATE-TOKEN: $ACCESSTOKEN" \
--data "$createreleasedata")
echo "Create release response: $response"
#curl --request POST --header "PRIVATE-TOKEN: %ACCESSTOKEN%" --data name="aic-%version%-win64.exe" --data url="https://git.abyle.org/scuq/aic/blob/v%version%/releases/aic-%version%-win64.exe" "https://git.abyle.org/api/v4/projects/146/releases/v%version%/assets/links"
#!/bin/bash
shortyear=`date '+%y'`
month=`date '+%m'`
day=`date '+%d'`
hour=`date '+%H'`
minute=`date '+%M'`
echo $shortyear > ..\aic\MAJOR.ver
echo $month > ..\aic\MINOR.ver
echo $day > ..\aic\PATCH.ver
echo $hour$minute > ..\aic\BUILD.ver
echo $shortyear.$month.$day.$hour$minute
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment