Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mckinsey/vizro into version…
Browse files Browse the repository at this point in the history
…_bump/vizro-core/0.1.8.dev0
  • Loading branch information
petar-qb committed Dec 15, 2023
2 parents 8679ca5 + 0114a39 commit cea1424
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 9 deletions.
23 changes: 14 additions & 9 deletions tools/check_package_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ def _check_no_dev_version(package_name, package_version):


if __name__ == "__main__":
package_name = "dummy_package"
package_version = "0.0.0"
new_release = False
number_of_releases = False
env_file = str(os.getenv("GITHUB_ENV"))

for package_name in AVAILABLE_PACKAGES:
package_version = subprocess.check_output(["hatch", "version"], cwd=f"{package_name}").decode("utf-8").strip()
for attempted_package_name in AVAILABLE_PACKAGES:
attempted_package_version = (
subprocess.check_output(["hatch", "version"], cwd=f"{attempted_package_name}").decode("utf-8").strip()
)

if _check_no_dev_version(package_name, package_version) and _check_no_version_pypi(
package_name, package_version
if _check_no_dev_version(attempted_package_name, attempted_package_version) and _check_no_version_pypi(
attempted_package_name, attempted_package_version
):
if new_release:
sys.exit("Cannot release two packages at the same time. Please modify your PR.")
new_release = True
package_name = attempted_package_name
package_version = attempted_package_version

with open(env_file, "a") as f:
f.write(f"NEW_RELEASE={str(new_release)}\n")
if new_release:
f.write(f"PACKAGE_NAME={package_name}\nPACKAGE_VERSION={package_version}\n")
with open(env_file, "a") as f:
f.write(f"NEW_RELEASE={str(new_release)}\n")
if new_release:
f.write(f"PACKAGE_NAME={package_name}\nPACKAGE_VERSION={package_version}\n")
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->

0 comments on commit cea1424

Please sign in to comment.