Merge branch 'update-release-scripts-for-gitlab' into 'master'

Updated release scripts to use GitLab.

See merge request !25
This commit is contained in:
Chad Arimura
2017-05-27 17:53:20 +00:00
3 changed files with 25 additions and 5 deletions

8
fn/Gopkg.lock generated
View File

@@ -1,4 +1,4 @@
memo = "b4102c23b2507910df0e91c8f237fa86290a29e4687b96097ed2e4870dfe3a1f"
memo = "9e1d9db05f14e4fcb5786440592f93e0baab3f6b9ef00fc46cb39da2dd0d5fce"
[[projects]]
branch = "master"
@@ -180,6 +180,12 @@ memo = "b4102c23b2507910df0e91c8f237fa86290a29e4687b96097ed2e4870dfe3a1f"
revision = "0bdeddeeb0f650497d603c4ad7b20cfe685682f6"
version = "v1.19.1"
[[projects]]
name = "gitlab.oracledx.com/odx/functions"
packages = ["api/version"]
revision = "37b53a5820fd2f10a1afa3b04e2423408828afb5"
version = "0.3.7"
[[projects]]
branch = "master"
name = "golang.org/x/net"

View File

@@ -34,3 +34,8 @@ win_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.std
release_url="https://gitlab.oracledx.com/api/v3/projects/9/repository/tags/$version/release"
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
# 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"
# sed "s/release=.*/release=\"$version\"/g" fn/install.sh > fn/install.sh.tmp
# mv fn/install.sh.tmp fn/install.sh

View File

@@ -4,8 +4,20 @@ set -ex
user="treeder"
service="functions"
tag="latest"
version_file="api/version/version.go"
# ensure working dir is clean
git status
if [[ -z $(git status -s) ]]
then
echo "tree is clean"
else
echo "tree is dirty, please commit changes before running this"
exit 1
fi
git pull
version_file="api/version/version.go"
if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then
echo "did not find semantic version in $version_file"
exit 1
@@ -16,9 +28,6 @@ echo "Version: $version"
make docker-build
sed "s/release=.*/release=\"$version\"/g" fn/install.sh > fn/install.sh.tmp
mv fn/install.sh.tmp fn/install.sh
git add -u
git commit -m "$service: $version release [skip ci]"
git tag -f -a "$version" -m "version $version"