Skip to content

Commit

Permalink
docs: move docs into a new directory
Browse files Browse the repository at this point in the history
  • Loading branch information
clabe45 committed Jul 5, 2022
1 parent d45d846 commit cd44afc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
path: ./docs/changelog.md

- name: Publish release to PyPi
run: pipenv run publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ Licensed under the Apache License, Version 2.0.

[yarn's]: https://github.com/FabricMC/yarn
[Fork]: https://github.com/clabe45/shulkr/fork
[changelog]: https://github.com/clabe45/shulkr/blob/main/CHANGELOG.md
[usage guidelines]: https://github.com/clabe45/shulkr/blob/main/usage-guidelines.md
[changelog]: https://github.com/clabe45/shulkr/blob/main/docs/changelog.md
[usage guidelines]: https://github.com/clabe45/shulkr/blob/main/docs/usage-guidelines.md
[DecompilerMC]: https://github.com/hube12/DecompilerMC
File renamed without changes.
File renamed without changes.
13 changes: 8 additions & 5 deletions scripts/bump/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
import keepachangelog


CHANGELOG_PATH = 'docs/changelog.md'


def current_version():
changes = keepachangelog.to_dict('CHANGELOG.md')
changes = keepachangelog.to_dict(CHANGELOG_PATH)
return sorted(changes.keys())[-1]


Expand All @@ -13,18 +16,18 @@ def main():
old_version = current_version()

# Release to get predicted version
keepachangelog.release('CHANGELOG.md')
keepachangelog.release(CHANGELOG_PATH)
predicted_version = current_version()

# Confirm version
user_input = input('New version [{}]: '.format(predicted_version))
new_version = user_input or predicted_version

# Undo temporary release
repo.git.restore('CHANGELOG.md')
repo.git.restore(CHANGELOG_PATH)

# Release with confirmed version
keepachangelog.release('CHANGELOG.md', new_version)
keepachangelog.release(CHANGELOG_PATH, new_version)

# Update setup.py
with open('setup.py', 'r') as setuppy:
Expand All @@ -35,7 +38,7 @@ def main():

# Commit to git
commit_message = f'chore: release version {new_version}\n\nBump version {old_version}{new_version}'
repo.git.commit('CHANGELOG.md', 'setup.py', message=commit_message)
repo.git.commit(CHANGELOG_PATH, 'setup.py', message=commit_message)
repo.git.tag(f'v{new_version}', annotate=True, message=f'version {new_version}')

print(f'Bumped version {old_version}{new_version}')
Expand Down

0 comments on commit cd44afc

Please sign in to comment.