Push "latest" binaries to github releases

This commit is contained in:
Régis Behmo 2019-02-18 09:22:41 +01:00
parent b643a87190
commit 65f7b0f14d
4 changed files with 23 additions and 6 deletions

1
.gitignore vendored
View File

@ -4,4 +4,5 @@ TODO
/build/tutor
/dist/
/releases/
/tutor_openedx.egg-info/

View File

@ -39,7 +39,9 @@ deploy:
- provider: releases
api_key:
secure: ffrhGvgxHf3WVnKsKiJZTUoEf3+ZBtIydPHQoTDmHiYMyPnaO6RJWxq5PnoDRr47b1vnvbCE0lhNsGr3sgnruQSN3xHYfT4wz1F6Lz7Y5Jt7Uq1W0/UfSRlB3BwYcFpkUb5fSXLSku+QrV8OTk/yItlY9tppnvXA9h4CZjQqgJYHYc1DRKWQVYnVs/dCttUpiPV3eyIFeQoPKFsHwZXKcm9cVzom5r+lkjwpw3AIuAutPd71jyj/Va/By6B/43yAIqw3sA/thBeL76vqd8C4cMeWE00of1EWnH+sx6pKz32Fqe/o6dVop5PZPCiI+TVIDxR8oLevHtPTCfIwRDg60y23DdH3bMGSw1bAyjeWTnhRGcdYQJi1NKq3hJ0ldy0lOFlUiMkKPdQBtU7i0xIpoXTIhnro0YUUtjbh/QEtyRn8nbMVeenId42Bymah5P8srhE8S2z0x0mirIqNlM/tgLKEOJXdSL4sPKCMwRLcTUIc0fCiwLeHJnHIrMNEfnWsqO1odzv/PS5nLsdiGHBmC63d+xLNllzincIV1djyi5SEzMZxcqmjX1n/G3nKYVXhaIQE0wWQSHqNwLlKluY0kPXCNtU1TPr5SJHGnomQKizVaEsDrdAjylBL+rPwVCAv9z8FCtyOg7uMx2WdD0pvky2Iy4rbl2RBLUHmUZoAjPY=
file: dist/tutor-$TRAVIS_OS_NAME
file: "releases/*"
file_glob: true
overwrite: true
skip_cleanup: true
on:
tags: true
@ -51,7 +53,7 @@ deploy:
skip_cleanup: true
on:
tags: true
condition: $BUILD_DOCKER = true
condition: $BUILD_DOCKER = true && $TRAVIS_TAG != "latest"
# Push to pypi
- provider: script
@ -59,4 +61,4 @@ deploy:
skip_cleanup: true
on:
tags: true
condition: $BUILD_PYPI = true
condition: $BUILD_PYPI = true && $TRAVIS_TAG != "latest"

View File

@ -7,6 +7,18 @@ compile-requirements: ## Compile requirements files
bundle: ## Bundle the tutor package in a single "dist/tutor" executable
pyinstaller --onefile --name=tutor --add-data=./tutor/templates:./tutor/templates ./bin/main
tag: ## Create a release, update the "latest" tag and push them to origin
$(MAKE) retag TAG=$(TAG)
$(MAKE) retag TAG=latest
retag:
echo "=== Creating tag $(TAG)"
git tag -d $(TAG) || true
git tag $(TAG)
echo "=== Pushing tag $(TAG)"
git push origin :$(TAG) || true
git push origin $(TAG)
travis: bundle ## Run tests on travis-ci
./dist/tutor config noninteractive
./dist/tutor images env
@ -21,7 +33,8 @@ ci-bundle: ## Create bundle
pip3 install -U setuptools
pip3 install -r requirements/dev.txt
$(MAKE) bundle
cp ./dist/tutor ./dist/tutor-$$TRAVIS_OS_NAME
mkdir -p releases/
cp ./dist/tutor ./releases/tutor-$$(uname -s)_$$(uname -m)
ci-test: ## Run basic tests
./dist/tutor config noninteractive

View File

@ -38,8 +38,9 @@ You can then browse the documentation with::
Releasing a new version
-----------------------
- Bump the ``__version`` value in ``tutor/__about__.py``.
- Bump the ``__version__`` value in ``tutor/__about__.py``.
- Replace "Latest" by the version name in CHANGELOG.md.
- Upgrade the tutor version for the cloud.
- Create a commit with the version changelog.
- ``git push && git push --tags``
- ``git push``
- ``make tag TAG=vxxx``