Skip to content

Commit

Permalink
Merge pull request #68 from HamletSargsyan/dev
Browse files Browse the repository at this point in the history
Release v10.0.0
  • Loading branch information
HamletSargsyan authored Oct 29, 2024
2 parents d37011a + bd006ac commit e25e494
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Форкнуть",
"хелп",
"химоза",
"хэллоуинского",
"энергос",
"юзай",
"юзнул",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [10.0.0] - 2024-10-29

### Добавлено

- Сообщение о входе и выходе участника из чата
- Добавлена команда `/event_shop` (реализация отсутствует) [#65](https://github.com/HamletSargsyan/livebot/issues/65)
- Функция `deprecated`
- Новые предметы: тыква 🎃 и конфета 🍬

### Изменено

- Переменная `version` переименована в `VERSION`
- Обновлена зависимость `redis` до версии 5.2.0
- Команда `/event` для хэллоуинского ивента

### Удалено

Expand Down
31 changes: 20 additions & 11 deletions tools/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ def usage():
sys.exit(0)


def run_command(command: str):
if os.system(command):
print(f'\n\nКоманда "{command}" завершилась с ошибкой.')
sys.exit(1)


prerelease = False

if len(sys.argv) == 1:
Expand Down Expand Up @@ -48,6 +54,8 @@ def usage():
if choice != "y":
sys.exit(0)

run_command("git switch dev")

with open("version", "w") as f:
f.write(str(version))

Expand Down Expand Up @@ -85,18 +93,19 @@ def usage():
f.write(content)


os.system("make fix && make lint && make format")
r = os.system('git commit -a -m "bump version" && git push')
run_command('git add . && git commit -a -m "bump version" && git push')
run_command("git switch main")
run_command("make fix && make lint && make format")

if r != 0:
sys.exit(1)

r = os.system(
f'gh release create v{version} --notes-file release_body.md {"-p" if prerelease else ""} --title v{version}'
run_command(
f'gh pr create --base main --head dev --title "Release v{version}" --body "Автоматический PR для релиза версии {version}"'
)
run_command("gh pr merge dev")
run_command(
f'gh release create v{version} --target main --notes-file release_body.md {"-p" if prerelease else ""} --title v{version}'
)

if r != 0:
sys.exit(1)

os.system("git fetch --tags")
print("Релиз успешно опубликован")
print("\n\nРелиз успешно создан и опубликован.\n\n")
run_command("git switch dev")
run_command("git fetch --tags")
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.0.0
10.0.0

0 comments on commit e25e494

Please sign in to comment.