Compare commits
58 Commits
v1.3.12
...
7e53e1ccb0
Author | SHA1 | Date | |
---|---|---|---|
7e53e1ccb0 | |||
e49e812b13 | |||
b1e0fcfadf | |||
31ef3ac8df | |||
8cf3f87c89 | |||
c446188311 | |||
8e2a8d597d | |||
7d3b1c34f6 | |||
b95c61118b | |||
0dfb158959 | |||
75c774bb24 | |||
cf80adb43c | |||
36d50cbe7f | |||
9148d207c7 | |||
5f6fef9448 | |||
946202de0e | |||
41a3717347 | |||
255c820439 | |||
aef3ba77ba | |||
2592c3a497 | |||
a48c5dfef0 | |||
00554d0b09 | |||
05a91cd8d8 | |||
7cf113eaff | |||
44d27adab2 | |||
e0a2dff5fe | |||
519a089684 | |||
ef053bb2b6 | |||
0a91c7b269 | |||
875d9d2b70 | |||
52840b9b0b | |||
da1fc7678f | |||
982bb5aa21 | |||
007737db13 | |||
17e5949201 | |||
6a57186091 | |||
babd3f47a0 | |||
5372fe10fe | |||
e0c9d90892 | |||
e5f5d1961b | |||
31a960fb9e | |||
3c2e75b77a | |||
367143c456 | |||
fbde4b764f | |||
e57f4216d4 | |||
b8beb992d6 | |||
4234b2254e | |||
b8faf79163 | |||
d35afaff46 | |||
a8a00372b5 | |||
72f4eab588 | |||
afa4eddc00 | |||
b0888e7e63 | |||
238a84a8a2 | |||
59cc00ca13 | |||
ab083f5f57 | |||
c111573206 | |||
52b2494e52 |
105
.github/workflows/gitea-release.yml
vendored
105
.github/workflows/gitea-release.yml
vendored
@ -2,6 +2,10 @@ name: Gitea Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
description: 'Token für Gitea API-Zugriff'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
@ -34,10 +38,11 @@ jobs:
|
|||||||
pio run -t buildfs
|
pio run -t buildfs
|
||||||
|
|
||||||
# Copy firmware binary
|
# Copy firmware binary
|
||||||
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_${VERSION}.bin
|
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin
|
||||||
|
|
||||||
# Create SPIFFS binary
|
# Create SPIFFS binary with magic byte
|
||||||
cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin
|
echo -ne '\xEA' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
|
||||||
|
cat .pio.build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
|
||||||
|
|
||||||
# Create full binary
|
# Create full binary
|
||||||
(cd .pio/build/esp32dev &&
|
(cd .pio/build/esp32dev &&
|
||||||
@ -71,19 +76,91 @@ jobs:
|
|||||||
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create Gitea Release
|
- name: Determine Gitea URL
|
||||||
|
id: gitea_url
|
||||||
run: |
|
run: |
|
||||||
|
echo "Debug Environment:"
|
||||||
|
echo "GITHUB_SERVER_URL=${GITHUB_SERVER_URL:-not set}"
|
||||||
|
echo "GITEA_SERVER_URL=${GITEA_SERVER_URL:-not set}"
|
||||||
|
echo "GITHUB_REPOSITORY=${GITHUB_REPOSITORY:-not set}"
|
||||||
|
echo "GITEA_REPOSITORY=${GITEA_REPOSITORY:-not set}"
|
||||||
|
echo "RUNNER_NAME=${RUNNER_NAME:-not set}"
|
||||||
|
|
||||||
|
# Set API URL based on environment
|
||||||
|
if [ -n "${GITEA_ACTIONS}" ] || [ -n "${GITEA_REPOSITORY}" ] || [[ "${RUNNER_NAME}" == *"gitea"* ]]; then
|
||||||
|
GITEA_API_URL="${GITHUB_SERVER_URL}"
|
||||||
|
GITEA_REPO=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f2)
|
||||||
|
GITEA_OWNER=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f1)
|
||||||
|
else
|
||||||
|
echo "Error: This workflow is only for Gitea"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "GITEA_API_URL=${GITEA_API_URL}" >> $GITHUB_OUTPUT
|
||||||
|
echo "GITEA_REPO=${GITEA_REPO}" >> $GITHUB_OUTPUT
|
||||||
|
echo "GITEA_OWNER=${GITEA_OWNER}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
GITEA_API_URL: ${{ steps.gitea_url.outputs.GITEA_API_URL }}
|
||||||
|
GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }}
|
||||||
|
GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }}
|
||||||
|
run: |
|
||||||
|
# Debug Token (nur Länge ausgeben für Sicherheit)
|
||||||
|
echo "Debug: Token length: ${#GITEA_TOKEN}"
|
||||||
|
if [ -z "$GITEA_TOKEN" ]; then
|
||||||
|
echo "Error: GITEA_TOKEN is empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
cd .pio/build/esp32dev
|
cd .pio/build/esp32dev
|
||||||
|
|
||||||
# Prepare files for upload
|
# Debug-Ausgaben
|
||||||
FILES=""
|
echo "Debug: API URL: ${GITEA_API_URL}"
|
||||||
for file in filaman_${VERSION}.bin webpage_${VERSION}.bin filaman_full_${VERSION}.bin; do
|
echo "Debug: Repository: ${GITEA_OWNER}/${GITEA_REPO}"
|
||||||
if [ -f "$file" ]; then
|
|
||||||
FILES="$FILES -a $file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Create release using git command
|
# Erstelle zuerst den Release ohne Dateien
|
||||||
git tag -a "v${VERSION}" -m "Release ${VERSION}"
|
echo "Debug: Creating release..."
|
||||||
git push origin "v${VERSION}"
|
RELEASE_DATA="{\"tag_name\":\"v${VERSION}\",\"name\":\"v${VERSION}\",\"body\":\"${{ steps.changelog.outputs.CHANGES }}\"}"
|
||||||
|
|
||||||
|
RELEASE_RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||||
|
-X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "${RELEASE_DATA}" \
|
||||||
|
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
|
||||||
|
|
||||||
|
RELEASE_STATUS=$(echo "$RELEASE_RESPONSE" | tail -n1)
|
||||||
|
RELEASE_BODY=$(echo "$RELEASE_RESPONSE" | head -n -1)
|
||||||
|
|
||||||
|
if [ "$RELEASE_STATUS" != "201" ]; then
|
||||||
|
echo "Error: Failed to create release"
|
||||||
|
echo "Response: $RELEASE_BODY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extrahiere die Release-ID aus der Antwort
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_BODY" | grep -o '"id":[0-9]*' | cut -d':' -f2)
|
||||||
|
|
||||||
|
# Lade die Dateien einzeln hoch
|
||||||
|
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
echo "Debug: Uploading $file..."
|
||||||
|
UPLOAD_RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||||
|
-X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @"$file" \
|
||||||
|
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=${file}")
|
||||||
|
|
||||||
|
UPLOAD_STATUS=$(echo "$UPLOAD_RESPONSE" | tail -n1)
|
||||||
|
if [ "$UPLOAD_STATUS" != "201" ]; then
|
||||||
|
echo "Warning: Failed to upload $file"
|
||||||
|
echo "Response: $(echo "$UPLOAD_RESPONSE" | head -n -1)"
|
||||||
|
else
|
||||||
|
echo "Successfully uploaded $file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
68
.github/workflows/github-release.yml
vendored
68
.github/workflows/github-release.yml
vendored
@ -3,7 +3,7 @@ name: GitHub Release
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
secrets:
|
secrets:
|
||||||
GITHUB_TOKEN:
|
RELEASE_TOKEN:
|
||||||
description: 'GitHub token for release creation'
|
description: 'GitHub token for release creation'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@ -17,6 +17,8 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@ -65,10 +67,11 @@ jobs:
|
|||||||
pio run -t buildfs
|
pio run -t buildfs
|
||||||
|
|
||||||
# Copy firmware binary
|
# Copy firmware binary
|
||||||
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_${VERSION}.bin
|
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin
|
||||||
|
|
||||||
# Always create SPIFFS binary
|
# Create SPIFFS binary with magic byte
|
||||||
cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin
|
echo -ne '\xEA' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
|
||||||
|
cat .pio/build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
|
||||||
|
|
||||||
# Create full binary (always)
|
# Create full binary (always)
|
||||||
(cd .pio/build/esp32dev &&
|
(cd .pio/build/esp32dev &&
|
||||||
@ -104,40 +107,35 @@ jobs:
|
|||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
cd .pio/build/esp32dev
|
cd .pio/build/esp32dev
|
||||||
|
|
||||||
# Create the release first
|
# Create release with available files
|
||||||
RELEASE_JSON=$(curl -L \
|
FILES_TO_UPLOAD=""
|
||||||
-X POST \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN" \
|
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases" \
|
|
||||||
-d "{
|
|
||||||
\"tag_name\":\"v${VERSION}\",
|
|
||||||
\"name\":\"Release ${VERSION}\",
|
|
||||||
\"body\":\"${{ steps.changelog.outputs.CHANGES }}\",
|
|
||||||
\"draft\":false,
|
|
||||||
\"prerelease\":false
|
|
||||||
}")
|
|
||||||
|
|
||||||
# Extract the upload URL from the response
|
# Always add firmware
|
||||||
UPLOAD_URL=$(echo "$RELEASE_JSON" | jq -r .upload_url | sed 's/{?name,label}//')
|
if [ -f "upgrade_filaman_firmware_v${VERSION}.bin" ]; then
|
||||||
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD upgrade_filaman_firmware_v${VERSION}.bin"
|
||||||
|
fi
|
||||||
|
|
||||||
# Upload the binary files
|
# Add SPIFFS and full binary only if they exist
|
||||||
for file in filaman_${VERSION}.bin webpage_${VERSION}.bin filaman_full_${VERSION}.bin; do
|
if [ -f "upgrade_filaman_website_v${VERSION}.bin" ]; then
|
||||||
if [ -f "$file" ]; then
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD upgrade_filaman_website_v${VERSION}.bin"
|
||||||
echo "Uploading $file..."
|
fi
|
||||||
curl -L \
|
|
||||||
-X POST \
|
if [ -f "filaman_full_${VERSION}.bin" ]; then
|
||||||
-H "Accept: application/vnd.github+json" \
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD filaman_full_${VERSION}.bin"
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN" \
|
fi
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
||||||
-H "Content-Type: application/octet-stream" \
|
# Create release with available files
|
||||||
"${UPLOAD_URL}?name=${file}" \
|
if [ -n "$FILES_TO_UPLOAD" ]; then
|
||||||
--data-binary "@${file}"
|
gh release create "v${VERSION}" \
|
||||||
fi
|
--title "Release ${VERSION}" \
|
||||||
done
|
--notes "${{ steps.changelog.outputs.CHANGES }}" \
|
||||||
|
$FILES_TO_UPLOAD
|
||||||
|
else
|
||||||
|
echo "Error: No files found to upload"
|
||||||
|
exit 1
|
||||||
|
fi
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -31,9 +31,11 @@ jobs:
|
|||||||
if: needs.detect-provider.outputs.provider == 'github'
|
if: needs.detect-provider.outputs.provider == 'github'
|
||||||
uses: ./.github/workflows/github-release.yml
|
uses: ./.github/workflows/github-release.yml
|
||||||
secrets:
|
secrets:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
gitea-release:
|
gitea-release:
|
||||||
needs: detect-provider
|
needs: detect-provider
|
||||||
if: needs.detect-provider.outputs.provider == 'gitea'
|
if: needs.detect-provider.outputs.provider == 'gitea'
|
||||||
uses: ./.github/workflows/gitea-release.yml
|
uses: ./.github/workflows/gitea-release.yml
|
||||||
|
secrets:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
131
CHANGELOG.md
131
CHANGELOG.md
@ -1,5 +1,136 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.3.30] - 2025-02-22
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.30
|
||||||
|
- workflow: update Gitea and GitHub release workflows to create SPIFFS binary with magic byte
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.29] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.29
|
||||||
|
- workflow: update Gitea release workflow to create release before file uploads
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.28] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.28
|
||||||
|
- workflow: update Gitea release workflow to use file uploads with curl
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.27] - 2025-02-21
|
||||||
|
### Added
|
||||||
|
- workflow: add GITEA_TOKEN secret for Gitea API access in release workflows
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.27
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.26] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.26
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- workflow: improve Gitea release workflow with enhanced error handling and debug outputs
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.25] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.25
|
||||||
|
- workflow: update Gitea release workflow to include RUNNER_NAME and improve error handling
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.24] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.24
|
||||||
|
- workflow: rename update files to upgrade in GitHub release workflow
|
||||||
|
- workflow: aktualisiere bestehende Einträge im Changelog für vorhandene Versionen
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- workflow: improve Gitea release process with dynamic URL determination and debug outputs
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.23] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.23
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- workflow: enhance Gitea release process with debug outputs and API connection checks
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.22] - 2025-02-21
|
||||||
|
### Added
|
||||||
|
- workflow: improve Gitea release process with additional environment variables and error handling
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.22
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.21] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.21
|
||||||
|
- workflow: enhance Gitea release process with API integration and token management
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.20] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.20
|
||||||
|
- workflow: enable git tagging and pushing for Gitea releases
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.19] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.19
|
||||||
|
- workflow: enable git push for version tagging in Gitea release
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.18] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- ACHTUNG: Installiere einmal das filaman_full.bin danach kannst du über die upgrade Files aktualisieren und deine Settings bleiben auch erhalten.
|
||||||
|
- ATTENTION: Install the filaman_full.bin once, then you can update via the upgrade files and your settings will also be retained.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.18] - 2025-02-21
|
||||||
|
### Added
|
||||||
|
- add note about filaman_full.bin installation in changelog
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.18
|
||||||
|
- update changelog for version 1.3.18 and enhance update script for existing entries
|
||||||
|
|
||||||
|
## [1.3.17] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.17
|
||||||
|
- ci: comment out git tag and push commands in gitea-release workflow
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.16] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.16
|
||||||
|
- ci: update filenames for firmware and website binaries in release workflows
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.15] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.15
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- ci: fix missing 'fi' in GitHub release workflow script
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.14] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.14
|
||||||
|
- ci: update GitHub release workflow to improve file upload handling
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.13] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.13
|
||||||
|
- ci: update GitHub release workflow to use RELEASE_TOKEN for improved security
|
||||||
|
|
||||||
|
|
||||||
## [1.3.12] - 2025-02-21
|
## [1.3.12] - 2025-02-21
|
||||||
### Changed
|
### Changed
|
||||||
- update webpages for version v1.3.12
|
- update webpages for version v1.3.12
|
||||||
|
@ -167,12 +167,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate file name pattern
|
// Validate file name pattern
|
||||||
if (updateType === 'firmware' && !file.name.startsWith('filaman_')) {
|
if (updateType === 'firmware' && !file.name.startsWith('upgrade_filaman_firmware_')) {
|
||||||
alert('Please select a valid firmware file (filaman_*.bin)');
|
alert('Please select a valid firmware file (upgrade_filaman_firmware_*.bin)');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (updateType === 'webpage' && !file.name.startsWith('webpage_')) {
|
if (updateType === 'webpage' && !file.name.startsWith('upgrade_filaman_website_')) {
|
||||||
alert('Please select a valid webpage file (webpage_*.bin)');
|
alert('Please select a valid webpage file (upgrade_filaman_website_*.bin)');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.3.12"
|
version = "1.3.30"
|
||||||
|
|
||||||
|
#test
|
||||||
|
|
||||||
[env:esp32dev]
|
[env:esp32dev]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
@ -122,7 +122,29 @@ def update_changelog():
|
|||||||
f.write(updated_content)
|
f.write(updated_content)
|
||||||
push_changes(version)
|
push_changes(version)
|
||||||
else:
|
else:
|
||||||
print(f"Version {version} already exists in changelog")
|
# Version existiert bereits, aktualisiere die bestehenden Einträge
|
||||||
|
version_pattern = f"## \\[{version}\\] - \\d{{4}}-\\d{{2}}-\\d{{2}}"
|
||||||
|
next_version_pattern = "## \\[.*?\\] - \\d{4}-\\d{2}-\\d{2}"
|
||||||
|
|
||||||
|
# Finde den Start der aktuellen Version
|
||||||
|
version_match = re.search(version_pattern, content)
|
||||||
|
if version_match:
|
||||||
|
version_start = version_match.start()
|
||||||
|
# Suche nach der nächsten Version
|
||||||
|
next_version_match = re.search(next_version_pattern, content[version_start + 1:])
|
||||||
|
|
||||||
|
if next_version_match:
|
||||||
|
# Ersetze den Inhalt zwischen aktueller und nächster Version
|
||||||
|
next_version_pos = version_start + 1 + next_version_match.start()
|
||||||
|
updated_content = content[:version_start] + changelog_entry + content[next_version_pos:]
|
||||||
|
else:
|
||||||
|
# Wenn keine nächste Version existiert, ersetze bis zum Ende
|
||||||
|
updated_content = content[:version_start] + changelog_entry + "\n"
|
||||||
|
|
||||||
|
with open(changelog_path, 'w') as f:
|
||||||
|
f.write(updated_content)
|
||||||
|
push_changes(version)
|
||||||
|
print(f"Updated entries for version {version}")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
update_changelog()
|
update_changelog()
|
Reference in New Issue
Block a user