Skip to content

Commit

Permalink
create release
Browse files Browse the repository at this point in the history
  • Loading branch information
twcclegg committed Jan 9, 2023
1 parent 4710365 commit 040cbe6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions csharp/lib/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ getReleaseDelta() {
curl https://api.github.com/repos/$1/compare/$2...$3 | jq .files[].filename
}

getAppVeyorStatus() {
$(curl https://ci.appveyor.com/api/projects/twcclegg/libphonenumber-csharp | jq -r .build.status)
}

createRelease() {
curl -f -H "Authorization: Bearer $GITHUB_TOKEN" -d "{\"tag_name\":\"$2\",\",name\":\"$2\"}" "https://api.github.com/repos/$1/releases"
}

UPSTREAM=$(getLatestGitHubRelease google/libphonenumber)
DEPLOYED=$(getLatestNugetRelease libphonenumber-csharp)

Expand Down Expand Up @@ -68,3 +76,21 @@ rm DumpLocale.class
git add -A
git commit -m "$UPSTREAM"
git push
sleep 15

echo "build pending"
while
sleep 15
echo -n "."
RESULT=$(getAppVeyorStatus twcclegg/libphonenumber-csharp)
[ $RESULT = "running" ]
do true
done

if [ $RESULT != "success" ]
then
echo "build failed"
exit
fi

createRelease twcclegg/libphonenumber-csharp $UPSTREAM

0 comments on commit 040cbe6

Please sign in to comment.