mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-22 02:18:39 +01:00
229c845481
* Added CI config to generate nightly builds from master * Fix typo * Don't write __init__.py directly We need to import the original in the script * Update wagtail.utils.version This is based off a copy from Django master made just now and adds support for 'dev' versions.
25 lines
582 B
Python
25 lines
582 B
Python
import datetime
|
|
import pathlib
|
|
import sys
|
|
import json
|
|
|
|
import boto3
|
|
|
|
dist_folder = pathlib.Path.cwd() / 'dist'
|
|
|
|
try:
|
|
f = next(dist_folder.glob('*.whl'))
|
|
except StopIteration:
|
|
print("No .whl files found in ./dist!")
|
|
sys.exit()
|
|
|
|
print("Uploading", f.name)
|
|
s3 = boto3.client('s3')
|
|
s3.upload_file(str(f), 'releases.wagtail.io', 'nightly/' + f.name, ExtraArgs={'ACL':'public-read'})
|
|
|
|
print("Updating latest.json")
|
|
|
|
boto3.resource('s3').Object('releases.wagtail.io', 'nightly/latest.json').put(Body=json.dumps({
|
|
"url": 'https://releases.wagtail.io/nightly/' + f.name,
|
|
}))
|