Compare commits

..

5 Commits

Author SHA1 Message Date
d5d7358f58 fix: enhance commit categorization for breaking changes 2025-08-30 08:54:40 +02:00
9b362b3c73 BREAKING CHANGE: Handling of Spools with Tags from Vendors.
fix: improve get_last_tag function to handle non-beta tags and fallback to newest tag
2025-08-30 08:52:45 +02:00
bc51956793 docs: update changelog and header for version v2.0.0-beta5
All checks were successful
Release Workflow / detect-provider (push) Successful in 4s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 3m18s
2025-08-30 08:25:58 +02:00
5666a58da2 docs: update platformio.ini for beta version v2.0.0-beta5 2025-08-30 08:25:58 +02:00
a35f15eca5 fix: call scale.tare() in setup after starting scale 2025-08-30 08:25:52 +02:00
5 changed files with 41 additions and 7 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## [2.0.0-beta5] - 2025-08-30
### Changed
- update platformio.ini for beta version v2.0.0-beta5
### Fixed
- call scale.tare() in setup after starting scale
## [2.0.0-beta4] - 2025-08-29
### Changed
- update platformio.ini for beta version v2.0.0-beta4

View File

@@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[common]
version = "2.0.0-beta4"
version = "2.0.0-beta5"
to_old_version = "1.5.10"
##

View File

@@ -14,17 +14,39 @@ def get_version():
return version_match.group(1) if version_match else None
def get_last_tag():
"""Get the last non-beta tag for changelog generation"""
try:
result = subprocess.run(['git', 'describe', '--tags', '--abbrev=0'],
# Get all tags sorted by version
result = subprocess.run(['git', 'tag', '-l', '--sort=-version:refname'],
capture_output=True, text=True)
return result.stdout.strip()
if result.returncode != 0:
return None
tags = result.stdout.strip().split('\n')
# Find the first (newest) non-beta tag
for tag in tags:
if tag and not '-beta' in tag.lower():
print(f"Using last stable tag for changelog: {tag}")
return tag
# Fallback: if no non-beta tags found, use the newest tag
print("No stable tags found, using newest tag")
if tags and tags[0]:
return tags[0]
return None
except subprocess.CalledProcessError:
return None
def categorize_commit(commit_msg):
"""Categorize commit messages based on conventional commits"""
lower_msg = commit_msg.lower()
if any(x in lower_msg for x in ['feat', 'add', 'new']):
# Check for breaking changes first
if ('!' in commit_msg and any(x in lower_msg for x in ['feat!', 'fix!', 'chore!', 'refactor!'])) or \
'breaking change' in lower_msg or 'breaking:' in lower_msg:
return 'Breaking Changes'
elif any(x in lower_msg for x in ['feat', 'add', 'new']):
return 'Added'
elif any(x in lower_msg for x in ['fix', 'bug']):
return 'Fixed'
@@ -34,6 +56,7 @@ def categorize_commit(commit_msg):
def get_changes_from_git():
"""Get changes from git commits since last tag"""
changes = {
'Breaking Changes': [],
'Added': [],
'Changed': [],
'Fixed': []
@@ -55,7 +78,9 @@ def get_changes_from_git():
if commit:
category = categorize_commit(commit)
# Clean up commit message
clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?:', '', commit).strip()
clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?!?:', '', commit).strip()
# Remove BREAKING CHANGE prefix if present
clean_msg = re.sub(r'^breaking change:\s*', '', clean_msg, flags=re.IGNORECASE).strip()
changes[category].append(clean_msg)
except subprocess.CalledProcessError:

View File

@@ -59,6 +59,7 @@ void setup() {
// Scale
start_scale(touchSensorConnected);
scale.tare();
// WDT initialisieren mit 10 Sekunden Timeout
bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus

View File

@@ -122,8 +122,8 @@ void start_scale(bool touchSensorConnected) {
}
scale.set_scale(calibrationValue);
vTaskDelay(pdMS_TO_TICKS(5000));
scale.tare();
//vTaskDelay(pdMS_TO_TICKS(5000));
//scale.tare();
// Display Gewicht
oledShowWeight(0);