blob: 0bf27871460db8749ca4b5356abe0acfd27b348d [file] [log] [blame]
Don Turner6ef7e0c2017-10-24 13:19:18 +01001#!/bin/sh
2
3if [ "$#" -ne 1 ]; then
4 echo "Usage: upload_release.sh <release_version>"
5 exit 1;
6fi
7
8if [ -z ${GITHUB_TOKEN} ]; then
9 echo "GITHUB_TOKEN not set. Please obtain a github developer token and set it using: \n\nexport GITHUB_TOKEN=<access token>"
10 exit 1;
11fi
12
13RELEASE_VERSION=$1
14
15pushd build
16
17GITHUB_RELEASE_BINARY=bin/darwin/amd64/github-release
18
19if [ ! -f ${GITHUB_RELEASE_BINARY} ]; then
20
21 # Download and extract the github release tool
22 wget https://github.com/aktau/github-release/releases/download/v0.7.2/darwin-amd64-github-release.tar.bz2 -O darwin-amd64-github-release.tar.bz2
23 tar xvjf darwin-amd64-github-release.tar.bz2
24fi
25
26if [ ! -f ${GITHUB_RELEASE_BINARY} ]; then
27 echo "Github release binary ${GITHUB_RELEASE_BINARY} does not exist."
28 exit 1;
29fi
30
31
32function upload_file(){
33 echo "Uploading ${1}"
34 ${GITHUB_RELEASE_BINARY} upload --user google --repo oboe --tag ${RELEASE_VERSION} \
35 --file upload/${1} --name ${1}
36}
37
38upload_file cdep-manifest.yml
39upload_file oboe-headers.zip
40upload_file oboe-armeabi.zip
41upload_file oboe-armeabi-v7a.zip
42upload_file oboe-arm64-v8a.zip
43upload_file oboe-x86.zip
44upload_file oboe-x86_64.zip
45upload_file oboe-mips.zip
46
47popd