Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version specification #8

Merged
merged 5 commits into from
Apr 9, 2020
Merged

Conversation

toshitanian
Copy link
Contributor

@toshitanian toshitanian commented Apr 8, 2020

pip install abeja-sdk した時に、pyproject.toml が含まれないので、pyproject.tomlabeja/version.py の両方を更新するスクリプトを追加

abeja.version を pyproject.toml から読むのではなく、pkg-resource から読むように修正

@toshitanian toshitanian requested a review from keigohtr April 8, 2020 09:03
@keigohtr
Copy link
Contributor

keigohtr commented Apr 8, 2020

[メモ]

platform-sdkのリリース手順

$ git flow release start X.X.X
$ vim CHANGELOG.md
$ poetry version X.X.X
$ git add pyproject.toml
$ git add CHANGELOG.md
$ git commit -m "bump version"
$ git flow release publish X.X.X

このPRで追加されたversionコマンドでversionを確認する方法

import pkg_resources
VERSION = pkg_resources.get_distribution('abeja-sdk').version

ちなみにpoetry自身はどうやっているか?

versionファイル作ってベタ書きしている・・・
https://github.com/python-poetry/poetry/blob/master/poetry/__version__.py

そしてここで読み込んで --version で表示
https://github.com/python-poetry/poetry/blob/master/poetry/console/application.py#L33

poetryでもissueは立っている

closeしているが議論は終わっていない・・・
python-poetry/poetry#273

Copy link
Contributor

@keigohtr keigohtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いろいろ調べたけどこれで動きそうなので試してみよう!

@@ -43,7 +44,7 @@ release: &release
release-rc: &release-rc
- checkout
- *install-release-dependencies
- run: poetry version $(PYTHONPATH=./ python tools/add_rc_version.py)
- run: poetry version $(PYTHONPATH=./ poetry run python tools/add_rc_version.py)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

見逃してました・・・LGTM

@toshitanian
Copy link
Contributor Author

poetryも2箇所いじってるすね... 悲しみのループ

@toshitanian toshitanian merged commit c91b173 into develop Apr 9, 2020
@toshitanian toshitanian deleted the fix_version_specification branch April 20, 2020 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants