Skip to content

Commit eda65f5

Browse files
committed
ensure we still use commit when falling back to major version
Signed-off-by: vsoch <[email protected]>
1 parent e5a3d5c commit eda65f5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/rse-ops/actions-updater/tree/main) (0.0.x)
17+
- enforce fallback to use major versions still enforces commit (0.0.13)
1718
- bug fix to version updater (0.0.12)
1819
- adding tests for updaters, docs, container (0.0.11)
1920
- adding set-output and set-state updaters (0.0.1)

action_updater/main/updaters/version/update.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ def detect(self, action):
6565
if not updated:
6666
updated = self.get_tagged_commit(tags)
6767

68-
# If not updated here, first try to get major tags
69-
if not updated:
70-
updated = self.get_major_tag(tags)
71-
7268
# If we don't have tags by this point, no go - we cannot parse
7369
if not updated:
7470
continue
@@ -127,6 +123,10 @@ def get_tagged_commit(self, tags):
127123
# Get ordered major tags
128124
ordered = sort_tags(list(tags))
129125

126+
# First pass - no ordered tags, try to do the same for the major versions
127+
if not ordered:
128+
ordered = sort_major(tags)
129+
130130
# If we don't have ordered, we could use branches, but skip for now
131131
if not ordered:
132132
return []

action_updater/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__copyright__ = "Copyright 2022, Vanessa Sochat"
33
__license__ = "MPL 2.0"
44

5-
__version__ = "0.0.12"
5+
__version__ = "0.0.13"
66
AUTHOR = "Vanessa Sochat"
77
88
NAME = "action-updater"

0 commit comments

Comments
 (0)