Skip to content

fix:version increment does not work directly #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cea568b
fix: add debug statement
wphyojpl Sep 21, 2023
a4a5ca4
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
8d1c193
fix: still finding out how to pass env
wphyojpl Sep 21, 2023
2e00f44
fix: cannot use >> in yaml
wphyojpl Sep 21, 2023
9e42d89
fix: add store version shell script in yml
wphyojpl Sep 21, 2023
6849722
chore: merge from develop
wphyojpl Sep 21, 2023
341aae0
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
cfef16c
fix: yaml format error
wphyojpl Sep 21, 2023
1be6e54
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
303687f
fix: yaml error again
wphyojpl Sep 21, 2023
a9fa932
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
185a549
fix: yaml err ???
wphyojpl Sep 21, 2023
0c82392
should not build now. only during merge
wphyojpl Sep 21, 2023
77cc787
fix: so puzzling
wphyojpl Sep 21, 2023
3e7f3be
fix: removing comments to see if that is the cause
wphyojpl Sep 21, 2023
a5f2b0e
fix: re-adding commented files
wphyojpl Sep 21, 2023
cd63cd0
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
2c5c8e7
fix: env bug now
wphyojpl Sep 21, 2023
8155c84
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
1d5e266
fix: script to merge the version update
wphyojpl Sep 21, 2023
3649ac2
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
ee54fa3
fix: add git bot username to avoid password
wphyojpl Sep 21, 2023
1138bce
Merge branch 'develop-temp' of github.com:unity-sds/unity-data-servic…
wphyojpl Sep 21, 2023
9a7c378
fix:version increment does not work directly
wphyojpl Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [5.3.4] - 2023-09-21
### Fixed
- [#$219](https://github.com/unity-sds/unity-data-services/pull/219) fix: git bot user to push changes

## [5.3.3] - 2023-09-18
### Changed
Expand Down
16 changes: 11 additions & 5 deletions ci.cd/update_setup_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
else:
raise RuntimeError(f'invalid PR Title: {pr_title}')

def get_new_version(current_version):
# Parse the current version and increment it
major, minor, patch = map(int, current_version.split('.'))
if patch1 == 1:
return f"{major}.{minor}.{patch + 1}"
if minor1 == 1:
return f"{major}.{minor + 1}.0"
return f"{major+1}.0.0"

def update_version():
# Specify the path to your setup.py file
setup_py_path = os.path.join(root_dir, 'setup.py')
Expand All @@ -37,13 +46,10 @@ def update_version():

# Find the current version using the regular expression pattern
current_version = re.search(version_pattern, setup_contents).group(1)

# Parse the current version and increment it
major, minor, patch = map(int, current_version.split('.'))
new_version = f"{major + major1}.{minor + minor1}.{patch + patch1}"
new_version = get_new_version(current_version)

# Replace the old version with the new version in setup.py
updated_setup_contents = re.sub(version_pattern, f"version = '{new_version}'", setup_contents)
updated_setup_contents = re.sub(version_pattern, f"version='{new_version}'", setup_contents)

# Write the updated contents back to setup.py
with open(setup_py_path, 'w') as setup_file:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

setup(
name="cumulus_lambda_functions",
version = '5.3.4',
version='5.3.3',
packages=find_packages(),
install_requires=install_requires,
tests_require=['mock', 'nose', 'sphinx', 'sphinx_rtd_theme', 'coverage', 'pystac', 'python-dotenv', 'jsonschema'],
Expand Down