Skip to content

Commit 0711e06

Browse files
Add auto-upload, fix spiffs to 0.2.0
1 parent bf2d5ab commit 0711e06

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.ghpass

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ if [ ! -r arena/downloaded ]; then
239239
)
240240

241241
( cd dl/gcc-xtensa && git reset --hard && git checkout ${xtensa_branch} )
242-
( cd dl/mkspiffs && git submodule update )
242+
( cd dl/mkspiffs && git checkout 0.2.0 && git submodule update )
243243

244244
# download and put tools directly in gcc directory
245245
# let gcc's configure deal with them in place

buildall.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ for host in linux win64 win32 osx arm64 rpi; do
1313
gcc=${gcc} host=${host} rel=${rel} subrel=${subrel} ./build build
1414
./build clean
1515
done
16+
17+
gcc=${gcc} host=${host} rel=${rel} subrel=${subrel} ./build install
18+
19+
pass=$(cat .ghpass)
20+
rm -rf ./venv
21+
mkdir ./venv
22+
virtualenv --no-site-packages venv
23+
pushd ./venv
24+
source bin/activate
25+
pip install -q pygithub
26+
python ../upload_release.py --user earlephilhower --pw "${pass}" --tag ${rel}-${subrel} --msg 'See https://github.com/esp8266/Arduino for more info' --name "ESP8266 Quick Toolchain for ${rel}-${subrel}" ../*.tar.gz ../*.zip
27+
deactivate
28+
popd
29+
rm -rf ./venv

upload_release.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/python2.7
2+
3+
from github import Github
4+
import argparse
5+
import collections
6+
import getpass
7+
import glob
8+
import json
9+
import mimetypes
10+
import os
11+
12+
parser = argparse.ArgumentParser(description='Patch in a section of the Arduino tools JSON')
13+
parser.add_argument('--user', help="Github username", type=str, required=True)
14+
parser.add_argument('--pw', help="Github password", type=str)
15+
parser.add_argument('--tag', help="Release tag", type=str, required=True)
16+
parser.add_argument('--name', help="Release name", type=str, required=True)
17+
parser.add_argument('--msg', help="Release message", type=str, required=True)
18+
parser.add_argument('files', nargs=argparse.REMAINDER)
19+
args = parser.parse_args()
20+
21+
if len(args.files) == 0:
22+
print "ERROR: No files specified"
23+
quit()
24+
25+
password = args.pw
26+
if password is None:
27+
password = getpass.getpass("Github password:")
28+
29+
gh = Github(args.user, password)
30+
repo = gh.get_repo(args.user + "/esp-quick-toolchain")
31+
release = repo.create_git_release(args.tag, args.name, args.msg, draft=True)
32+
for fn in args.files:
33+
print "Uploading file: " + fn
34+
release.upload_asset(fn)

0 commit comments

Comments
 (0)