From 52409e35e3a94969aa024d51ad564a79b5f850e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sun, 7 Jun 2020 10:33:59 +0200 Subject: [PATCH 1/4] ci: release locales through a workflow --- .github/workflows/release.yml | 101 ++++++++++++++++++++++++---------- Makefile | 7 ++- 2 files changed, 77 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87e16c0..e72dea2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,33 +1,78 @@ name: Release Application on: - release: - types: [created] + push: + tags: ['v*'] jobs: - pip: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.7' - - name: Setup environment - run: | - sudo apt update - sudo apt install ruby - sudo gem install ronn - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine skyfield numpy tabulate Babel requests - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - POEDITOR_API_ACCESS: ${{ secrets.POEDITOR_API_ACCESS }} - POEDITOR_PROJECT_ID: 306433 - run: | - make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build - twine upload dist/* + release: + name: Create release + runs-on: ubuntu-latest + steps: + - name: Prepare release + id: prepare_release + run: | + changelog="$(git diff HEAD^ HEAD -- CHANGELOG.md | grep -E '\+[#*]' | sed 's/^+//')" + changelog="${changelog//$'%'/'%25'}" + changelog="${changelog//$'\n'/'%0A'}" + changelog="${changelog//$'\r'/'%0D'}" + echo "::set-output name=changelog::$changelog" + - name: Checkout code + uses: actions/checkout@v2 + - name: Build locales + env: + POEDITOR_API_ACCESS: ${{ secrets.POEDITOR_API_ACCESS }} + run: | + make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" i18n + tar cf locales.tar.gz kosmorrolib/locales + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Version ${{ github.ref }} + draft: true + prerelease: false + body: | + ${{ steps.prepare_release.outputs.changelog }} + - name: Upload locales + id: upload-locales + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./locales.tar.gz + asset_name: locales.tar.gz + asset_content_type: application/x-tar + + + pip: + name: Release to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.7' + - name: Setup environment + run: | + sudo apt update + sudo apt install ruby + sudo gem install ronn + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine skyfield numpy tabulate Babel requests + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + POEDITOR_API_ACCESS: ${{ secrets.POEDITOR_API_ACCESS }} + POEDITOR_PROJECT_ID: 306433 + run: | + make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build + twine upload dist/* diff --git a/Makefile b/Makefile index d6ed8b7..776b6db 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,10 @@ test: unset KOSMORRO_TIMEZONE; \ LANG=C pipenv run python3 -m coverage run -m unittest test -build: +build: i18n + python3 setup.py sdist bdist_wheel + +i18n: ronn --roff manpage/kosmorro.1.md ronn --roff manpage/kosmorro.7.md @@ -15,8 +18,6 @@ build: python3 setup.py compile_catalog; \ fi - python3 setup.py sdist bdist_wheel - env: @if [[ "$$RELEASE_NUMBER" == "" ]]; \ then echo "Missing environment variable: RELEASE_NUMBER."; \ From fd4c612a301e828face19390e1469fcf1b7a706e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sun, 7 Jun 2020 11:14:32 +0200 Subject: [PATCH 2/4] build: bump version 0.8.1 --- CHANGELOG.md | 10 ++++++++++ kosmorrolib/locales/messages.pot | 4 ++-- kosmorrolib/version.py | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e281bdc..1e85061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# [v0.8.1](https://github.com/Deuchnord/kosmorro/compare/v0.8.0...v0.8.1) (2020-06-07) + + +### Bug Fixes + +* avoid returning ephemerides for yesterday or tomorrow ([75eba49](https://github.com/Deuchnord/kosmorro/commit/75eba4977c7ea928e76a99710041f01c2f500972)) +* handle out of range date error ([c39cd3a](https://github.com/Deuchnord/kosmorro/commit/c39cd3aefa263eef9d2a4f42717e0eb05d3e0920)) + + + # [v0.8.0](https://github.com/Deuchnord/kosmorro/compare/v0.7.0...v0.8.0) (2020-05-22) diff --git a/kosmorrolib/locales/messages.pot b/kosmorrolib/locales/messages.pot index f66a485..01b58dd 100644 --- a/kosmorrolib/locales/messages.pot +++ b/kosmorrolib/locales/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: kosmorro 0.8.0\n" +"Project-Id-Version: kosmorro 0.8.1\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-06-06 16:51+0200\n" +"POT-Creation-Date: 2020-06-07 11:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/kosmorrolib/version.py b/kosmorrolib/version.py index 1ae3427..0fca5f9 100644 --- a/kosmorrolib/version.py +++ b/kosmorrolib/version.py @@ -16,4 +16,4 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -VERSION = '0.8.0' +VERSION = '0.8.1' From 203822bc5aaf6126d6ece1822002cd5c44522885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sun, 7 Jun 2020 11:22:04 +0200 Subject: [PATCH 3/4] ci: fix release workflow --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e72dea2..41c9d56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,13 @@ jobs: name: Create release runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup + run: | + sudo apt update + sudo apt install ruby + sudo gem install ronn - name: Prepare release id: prepare_release run: | @@ -17,8 +24,6 @@ jobs: changelog="${changelog//$'\n'/'%0A'}" changelog="${changelog//$'\r'/'%0D'}" echo "::set-output name=changelog::$changelog" - - name: Checkout code - uses: actions/checkout@v2 - name: Build locales env: POEDITOR_API_ACCESS: ${{ secrets.POEDITOR_API_ACCESS }} From 296ef06cf941cb0098926f6d97799dc891beaf10 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2020 05:28:31 +0000 Subject: [PATCH 4/4] chore(deps-dev): bump pylint from 2.5.2 to 2.5.3 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.5.2 to 2.5.3. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/pylint-2.5.2...pylint-2.5.3) Signed-off-by: dependabot-preview[bot] --- Pipfile.lock | 51 ++++++++++++--------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 7371fe8..66ec5c3 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -18,10 +18,10 @@ "default": { "certifi": { "hashes": [ - "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", - "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" + "sha256:5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1", + "sha256:9cd41137dc19af6a5e03b630eefe7d1f458d964d406342dd3edf625839b944cc" ], - "version": "==2020.4.5.1" + "version": "==2020.4.5.2" }, "data": { "hashes": [ @@ -177,10 +177,10 @@ "develop": { "astroid": { "hashes": [ - "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1", - "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc1999248480b18bd31a0f38" + "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", + "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" ], - "version": "==2.4.1" + "version": "==2.4.2" }, "babel": { "hashes": [ @@ -192,10 +192,10 @@ }, "certifi": { "hashes": [ - "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", - "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" + "sha256:5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1", + "sha256:9cd41137dc19af6a5e03b630eefe7d1f458d964d406342dd3edf625839b944cc" ], - "version": "==2020.4.5.1" + "version": "==2020.4.5.2" }, "chardet": { "hashes": [ @@ -303,11 +303,11 @@ }, "pylint": { "hashes": [ - "sha256:b95e31850f3af163c2283ed40432f053acbc8fc6eba6a069cb518d9dbf71848c", - "sha256:dd506acce0427e9e08fb87274bcaa953d38b50a58207170dbf5b36cf3e16957b" + "sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc", + "sha256:d0ece7d223fe422088b0e8f13fa0a1e8eb745ebffcb8ed53d3e95394b6101a1c" ], "index": "pypi", - "version": "==2.5.2" + "version": "==2.5.3" }, "pylintfileheader": { "hashes": [ @@ -345,33 +345,6 @@ ], "version": "==0.10.1" }, - "typed-ast": { - "hashes": [ - "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", - "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", - "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", - "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", - "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", - "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", - "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", - "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", - "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", - "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", - "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", - "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", - "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", - "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", - "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", - "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", - "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", - "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", - "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", - "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", - "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" - ], - "markers": "implementation_name == 'cpython' and python_version < '3.8'", - "version": "==1.4.1" - }, "unittest-data-provider": { "hashes": [ "sha256:86bc7fb6608c2570aeedadea346fe3034afc940807dd7519e95e5dbc899ac2be"