From 3c20a66e420472b3ec131018b6e39bbc29c2951b Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Thu, 11 Aug 2016 17:07:58 +0200 Subject: [PATCH] upgrade release process based on travis --- .travis.yml | 26 ++++++++++++++++---------- manage.sh | 22 +++++----------------- scripts/twitt_release.py | 39 --------------------------------------- 3 files changed, 21 insertions(+), 66 deletions(-) delete mode 100755 scripts/twitt_release.py diff --git a/.travis.yml b/.travis.yml index 87eefc59..0514090b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,22 @@ language: python - python: - - "2.7" - - "2.6" - - "3.2" - - "3.3" - - "3.4" - +- '2.7' +- '2.6' +- '3.2' +- '3.3' +- '3.4' sudo: false - script: - - python setup.py test - +- python setup.py test notifications: email: false +deploy: + provider: pypi + user: pygithubtravis + password: + secure: HXQWNJC6F6mkwfSHd8wbSJmAroYh/lNzF8rEyJ9MoWAQHWqFm395zMj7S4BB/Kn6y08zJGTzOcRwmm2zyMO4o+A0D3DI961T9HLJYRMB6y8xkGULWHxWgxRQByxefco+ftA02Pj6DtkThxONRmj5noUlU3rC14j2j4NQGcvPQhc= + on: + tags: true + distributions: sdist bdist_wheel + repo: PyGithub/PyGithub + python: '2.7' \ No newline at end of file diff --git a/manage.sh b/manage.sh index da5f5c7f..fbcbbf0e 100755 --- a/manage.sh +++ b/manage.sh @@ -2,13 +2,10 @@ # -*- coding: utf-8 -*- function publish { - check - test bump readme doc push - # twitt_release } function check { @@ -41,10 +38,11 @@ function bump { } function readme { - git log v$previousVersion.. --oneline - - echo "Edit README.rst and doc/changes.rst now, then press enter" - read foobar + # creates a changelog based on the commits from the previous version until now + changelog=$(tail -n +6 doc/changes.rst) + gitlog=$(git log v$previousVersion.. --oneline --pretty=format:'* %s (%h)' | grep -v "Merge") + today=$(date "+(%B %m, %Y)") + echo "Change log\n==========\n\nStable versions\n~~~~~~~~~~~~~~~\n\nVersion $version $today\n-----------------------------------\n\n$gitlog\n$changelog" > doc/changes.rst } function doc { @@ -65,18 +63,12 @@ function push { git commit -am "Publish version $version" - sdist_upload - git tag -m "Version $version" v$version git push github master master:develop gh-pages git push --tags } -function sdist_upload { - python setup.py sdist upload -} - function unmerged { BRANCHES_NOT_TO_BE_MERGED="-e gh-pages -e topic/DependencyGraph" COMMITS_NOT_TO_BE_MERGED="-e 1bea00a -e 11aeaa7 -e dd1e255 -e 670c6fb -e ed87a91 -e 072fbcb -e 421a743 -e 0c45af7 -e 92e4df4 -e 79ebd4b -e 0965ffd -e e1990c5 -e 55f3250" @@ -104,8 +96,4 @@ function compare_to_api_ref_doc { python scripts/compare_to_api_ref_doc.py } -function twitt_release { - python scripts/twitt_release.py $version -} - $1 diff --git a/scripts/twitt_release.py b/scripts/twitt_release.py deleted file mode 100755 index baed450e..00000000 --- a/scripts/twitt_release.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# ########################## Copyrights and license ############################ -# # -# Copyright 2013 Vincent Jacques # -# # -# This file is part of PyGithub. # -# http://pygithub.github.io/PyGithub/v1/index.html # -# # -# PyGithub is free software: you can redistribute it and/or modify it under # -# the terms of the GNU Lesser General Public License as published by the Free # -# Software Foundation, either version 3 of the License, or (at your option) # -# any later version. # -# # -# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # -# details. # -# # -# You should have received a copy of the GNU Lesser General Public License # -# along with PyGithub. If not, see . # -# # -# ############################################################################## - -import sys -import twitter # pip install python-twitter - -import TwitterCredentials as cred -# Must contain: -# consumer_key = "" -# consumer_secret = "" -# access_token_key = "" -# access_token_secret = "" -# from https://dev.twitter.com/apps/5252388/show - -api = twitter.Api(consumer_key=cred.consumer_key, consumer_secret=cred.consumer_secret, access_token_key=cred.access_token_key, access_token_secret=cred.access_token_secret) -message = "I've just published version " + sys.argv[1] + " of PyGithub http://github.com/jacquev6/PyGithub" -api.PostUpdate(message)