Automatically update Bintray version on Travis

This commit is contained in:
Alberto Sottile 2018-07-21 19:11:46 +02:00
parent 759f1e1457
commit 67baa68190
3 changed files with 24 additions and 10 deletions

View File

@ -43,6 +43,7 @@ before_deploy:
- mv resources/macOS_readme.pdf resources/.macOS_readme.pdf
- export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg
- python3 bintray_version.py
deploy:
skip_cleanup: true

View File

@ -4,16 +4,17 @@
"repo": "Syncplay",
"subject": "syncplay"
},
"version": {
"name": "v1.5.4"
"name": "v1.5.6"
},
"files":
[
{"includePattern": "dist_dmg/(.*)", "uploadPattern": "$1",
"matrixParams": {
"override": 1 }}
],
"files": [
{
"includePattern": "dist_dmg/(.*)",
"uploadPattern": "$1",
"matrixParams": {
"override": 1
}
}
],
"publish": true
}
}

12
bintray_version.py Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import json
from syncplay import version
f = open('bintray.json', 'r')
data = json.load(f)
data['version']['name'] = 'v' + version
g = open('bintray.json', 'w')
json.dump(data, g, indent=4)