functions: 0.3.6 release [skip ci]

This commit is contained in:
Travis Reeder
2017-05-27 10:08:14 -07:00
parent 71b66091df
commit d3b713cf16
5 changed files with 21 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
package version
// Version of Functions
var Version = "0.3.5"
var Version = "0.3.6"

View File

@@ -3,7 +3,7 @@ set -e
# Install script to install fn
release="0.3.5"
release="0.3.6"
command_exists() {
command -v "$@" > /dev/null 2>&1

View File

@@ -1,4 +1,5 @@
set -ex
./build.sh
docker push treeder/functions-lambda:nodejs4.3
# TODO: where to push?
# docker push treeder/functions-lambda:nodejs4.3

View File

@@ -2,12 +2,12 @@
set -ex
# cd lambda
# ./release.sh
# cd ..
cd lambda
./release.sh
cd ..
# make dep
# make release
make dep
make release
version=$1
@@ -23,19 +23,14 @@ version=$1
# For GitLab
# 1) Upload files: https://docs.gitlab.com/ee/api/projects.html#upload-a-file
upload_url='https://gitlab.oracledx.com/api/v3/projects/9/uploads'
curl --request POST --form "file=@fn_linux" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $upload_url
# curl --data-binary "@fn_mac" -H "Content-Type: application/octet-stream" -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY $upload_url\?name\=fn_mac >/dev/null
# curl --data-binary "@fn.exe" -H "Content-Type: application/octet-stream" -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY $upload_url\?name\=fn.exe >/dev/null
output=$(curl --request POST --form "file=@fn_linux" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $upload_url)
linux_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["markdown"]')
output=$(curl --request POST --form "file=@fn_mac" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $upload_url)
mac_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["markdown"]')
output=$(curl --request POST --form "file=@fn.exe" --header "PRIVATE-TOKEN: $GITLAB_TOKEN" $upload_url)
win_markdown=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["markdown"]')
# url='https://gitlab.oracledx.com/api/v3/projects/9/uploads'
# output=$(curl -s -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY -d "{\"tag_name\": \"$version\", \"name\": \"$version\"}" $url)
# upload_url=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["upload_url"]' | sed -E "s/\{.*//")
# html_url=$(echo "$output" | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["html_url"]')
# curl --data-binary "@fn_linux" -H "Content-Type: application/octet-stream" -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY $upload_url\?name\=fn_linux >/dev/null
# curl --data-binary "@fn_mac" -H "Content-Type: application/octet-stream" -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY $upload_url\?name\=fn_mac >/dev/null
# curl --data-binary "@fn.exe" -H "Content-Type: application/octet-stream" -u $GH_DEPLOY_USER:$GH_DEPLOY_KEY $upload_url\?name\=fn.exe >/dev/null
# 2) Create a release: https://docs.gitlab.com/ee/api/tags.html#create-a-new-release
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

View File

@@ -10,12 +10,11 @@ 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
fi
perl -i -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file)
echo "Version: $version"
make docker-build
# make docker-build
sed "s/release=.*/release=\"$version\"/g" fn/install.sh > fn/install.sh.tmp
mv fn/install.sh.tmp fn/install.sh
@@ -26,6 +25,7 @@ git tag -f -a "$version" -m "version $version"
git push
git push origin $version
# TODO: Where to push these?
# Finally tag and push docker images
# docker tag $user/$service:$tag $user/$service:$version
# docker push $user/$service:$version