mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fixing fn release script
This commit is contained in:
@@ -30,12 +30,13 @@ echo "Version: $version"
|
|||||||
# make dep
|
# make dep
|
||||||
make release
|
make release
|
||||||
|
|
||||||
|
tag = "fn-$version"
|
||||||
git add -u
|
git add -u
|
||||||
git commit -m "fn tool: $version release [skip ci]"
|
git commit -m "fn tool: $version release [skip ci]"
|
||||||
# todo: might make sense to move this into it's own repo so it can have it's own versioning at some point
|
# todo: might make sense to move this into it's own repo so it can have it's own versioning at some point
|
||||||
git tag -f -a "fn-$version" -m "fn version $version"
|
git tag -f -a $tag -m "fn version $version"
|
||||||
git push
|
git push
|
||||||
git push origin "fn-$version"
|
git push origin $tag
|
||||||
|
|
||||||
# For GitHub
|
# For GitHub
|
||||||
# url='https://api.github.com/repos/treeder/functions/releases'
|
# url='https://api.github.com/repos/treeder/functions/releases'
|
||||||
@@ -57,9 +58,9 @@ output=$(curl --request POST --form "file=@fn.exe" --header "PRIVATE-TOKEN: $GIT
|
|||||||
win_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["markdown"]')
|
win_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["markdown"]')
|
||||||
|
|
||||||
# 2) Create a release: https://docs.gitlab.com/ee/api/tags.html#create-a-new-release
|
# 2) Create a release: https://docs.gitlab.com/ee/api/tags.html#create-a-new-release
|
||||||
release_url="https://gitlab-odx.oracle.com/api/v3/projects/9/repository/tags/$version/release"
|
release_url="https://gitlab-odx.oracle.com/api/v3/projects/9/repository/tags/$tag/release"
|
||||||
release_desc="Amazing release. Wow\n\nfn for Linux: $linux_markdown \n\nfn for Mac: $mac_markdown \n\nfn for Windows: $win_markdown"
|
release_desc="Amazing release. Wow\n\nfn for Linux: $linux_markdown \n\nfn for Mac: $mac_markdown \n\nfn for Windows: $win_markdown"
|
||||||
curl --request POST -H "PRIVATE-TOKEN: $GITLAB_TOKEN" -H "Content-Type: application/json" -d "{\"tag_name\": \"$version\", \"description\": \"$release_desc\"}" $release_url
|
curl --request POST -H "PRIVATE-TOKEN: $GITLAB_TOKEN" -H "Content-Type: application/json" -d "{\"tag_name\": \"$tag\", \"description\": \"$release_desc\"}" $release_url
|
||||||
|
|
||||||
# TODO: Add the download URLS to install.sh. Maybe we should make a template to generate install.sh
|
# TODO: Add the download URLS to install.sh. Maybe we should make a template to generate install.sh
|
||||||
# TODO: Download URL's are in the output vars above under "url". Eg: "url":"/uploads/9a1848c5ebf2b83f8b055ac0e50e5232/fn.exe"
|
# TODO: Download URL's are in the output vars above under "url". Eg: "url":"/uploads/9a1848c5ebf2b83f8b055ac0e50e5232/fn.exe"
|
||||||
|
|||||||
Reference in New Issue
Block a user