mirror of
https://github.com/rio-labs/rio.git
synced 2026-01-05 20:59:46 -06:00
update publishing script
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
__version__ = "0.5.11"
|
||||
__version__ = "0.5.12"
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
@@ -18,6 +17,10 @@ def main() -> None:
|
||||
if process.stdout.strip("\n") != "dev":
|
||||
revel.fatal("You must checkout the 'dev' branch")
|
||||
|
||||
# Make sure the version number got bumped
|
||||
if rio.__version__ == get_latest_published_version():
|
||||
revel.fatal("You forgot to increment the version number")
|
||||
|
||||
# Build the TS code
|
||||
subprocess.run(["rye", "run", "build"], check=True)
|
||||
|
||||
@@ -25,14 +28,6 @@ def main() -> None:
|
||||
if not tests_pass():
|
||||
revel.fatal("The test don't pass")
|
||||
|
||||
# Make sure the version number got bumped
|
||||
if rio.__version__ == get_latest_published_version():
|
||||
choice = revel.select(
|
||||
{choice: choice for choice in ("patch", "minor", "major")},
|
||||
prompt="You forgot to increment the version number. Which part do you wish to bump?",
|
||||
)
|
||||
subprocess.run([sys.executable, "-m", "hatch", "version", choice])
|
||||
|
||||
# Merge dev into main and push
|
||||
subprocess.run(["git", "fetch", ".", "dev:main"], check=True)
|
||||
subprocess.run(["git", "push", "-u", "origin", "main"], check=True)
|
||||
@@ -48,7 +43,7 @@ def get_latest_published_version() -> str:
|
||||
|
||||
|
||||
def tests_pass() -> bool:
|
||||
return subprocess.run(["rye", "test"], check=True) == 0
|
||||
return subprocess.run(["rye", "test", "--", "-x"], check=True) == 0
|
||||
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user