Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
osoucy committed Dec 13, 2023
1 parent 7c7198e commit 4ed19a9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
11 changes: 6 additions & 5 deletions .github/scripts/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from packaging import version

script_root = os.path.dirname(__file__)
laktory_root = "./settus/"
package_name = "settus"
laktory_root = f"./{package_name}/"


def main():
Expand Down Expand Up @@ -66,13 +67,13 @@ def update_changelog(changelog_filepath, v0, v1):
'# Release History',
'',
f'## [{v1}] - Unreleased',
'###Added',
'### Added',
'* n/a',
'###Fixed',
'### Fixed',
'* n/a',
'###Updated',
'### Updated',
'* n/a',
'###Breaking changes',
'### Breaking changes',
'* n/a',
''
]
Expand Down
17 changes: 11 additions & 6 deletions .github/scripts/write_release_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,30 @@ def main():

# Read version file
with open(version_filepath) as fp:
v0 = fp.read().split("=")[-1].strip().replace('"', '')
print(f"Get changes for {package_name} {v0}")
release_version = fp.read().split("=")[-1].strip().replace('"', '')
print(f"Get changes for {package_name} {release_version}")

# Read changelog
with open(changelog_filepath, 'r') as fp:
content = fp.read()
blocks = content.split("## [")

# Select latest changes
content = content.split("## ")[1]
content = "\n".join(content.split("\n")[1:]).strip()
changes = blocks[1]
changes = "\n".join(changes.split("\n")[1:]).strip()
print("Release Content")
print("---------------")
print(content)
print(changes)
print("--------------")

# Add compare to previous release
previous_version = blocks[2].split("]")[0]
changes += f"\nFull [Changelog](https://github.com/okube-ai/{package_name}/compare/v{previous_version}...v{release_version}/)"

# Write body
print(f"Writing body {body_filepath}")
with open(body_filepath, 'w') as fp:
fp.write(content)
fp.write(changes)

if os.getenv("GITHUB_OUTPUT") is None:
os.remove(body_filepath)
Expand Down
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Release History

## [0.0.9] - Unreleased
###Added
### Added
* Documentation

## [0.0.8] - 2023-09-24
###Added
### Added
* Lean tests for installation without optional dependencies

## [0.0.7] - 2023-09-24
###Fixed
### Fixed
* ModuleNotFoundError with optional dependencies

## [0.0.6] - 2023-09-23
###Fixed
### Fixed
* ModuleNotFoundError with optional dependencies
###Updated
* Documentation to include required environment variables.

## [0.0.5] - 2023-09-22
###Added
### Added
* Support for AWS secrets

## [0.0.4] - 2023-09-21
###Added
### Added
* Support for the same alias(es) used across multiple fields

## [0.0.3] - 2023-09-17
###Added
### Added
* Azure Keyvault support

## [0.0.2] - 2023-07-30
###Updated
### Updated
* Changed build backend from flit to setuptools

## [0.0.1] - 2023-07-16
###Added
### Added
* Initial pypi release

0 comments on commit 4ed19a9

Please sign in to comment.