Compare commits
	
		
			43 Commits
		
	
	
		
			v1.2.100
			...
			bb166aa29f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| bb166aa29f | |||
| 0d718023f8 | |||
| b16781043f | |||
| dff184ff25 | |||
| 0ce281221d | |||
| bc26c160e8 | |||
| c25f41db75 | |||
| e107c17f50 | |||
| 85b9d03ebd | |||
| 17b188626a | |||
| a534c5f872 | |||
| 93f7582790 | |||
| 46acc63756 | |||
| 67a9e1bdce | |||
| 2b75b64b4a | |||
| 8d003295e7 | |||
| f89500946a | |||
| 14e745ff06 | |||
| d058397fa2 | |||
| 622f5403a7 | |||
| 92b78a86dd | |||
| ec399390e8 | |||
| 909c4e9b5e | |||
| f4b20bfffd | |||
| 78464215a9 | |||
| 4365f0463a | |||
| 727bc0e760 | |||
| 04604013eb | |||
| cf5fc5f6f1 | |||
| 945a4ccce6 | |||
| 7cf9e2d145 | |||
| 9db4e338ea | |||
| dea6ca2c66 | |||
| e224e72e41 | |||
| 306c517da7 | |||
| 0337bbabe0 | |||
| bde14e50e0 | |||
| 9c656a9bd0 | |||
| eae552017d | |||
| a77918da41 | |||
| 262dad38a6 | |||
| cfc9f103cf | |||
| 0117302672 | 
							
								
								
									
										89
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,89 @@ | |||||||
|  | name: Gitea Release | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   workflow_call: | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   create-release: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |     - uses: actions/checkout@v4 | ||||||
|  |      | ||||||
|  |     - name: Set up Python | ||||||
|  |       uses: actions/setup-python@v4 | ||||||
|  |       with: | ||||||
|  |         python-version: '3.x' | ||||||
|  |      | ||||||
|  |     - name: Install PlatformIO | ||||||
|  |       run: | | ||||||
|  |         python -m pip install --upgrade pip | ||||||
|  |         pip install --upgrade platformio esptool | ||||||
|  |      | ||||||
|  |     - name: Install xxd | ||||||
|  |       run: | | ||||||
|  |         sudo apt-get update | ||||||
|  |         sudo apt-get install xxd | ||||||
|  |      | ||||||
|  |     - name: Build Firmware | ||||||
|  |       run: | | ||||||
|  |         VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2) | ||||||
|  |          | ||||||
|  |         # Build firmware and SPIFFS | ||||||
|  |         echo "Building firmware and SPIFFS..." | ||||||
|  |         pio run -e esp32dev | ||||||
|  |         pio run -t buildfs | ||||||
|  |          | ||||||
|  |         # Copy firmware binary | ||||||
|  |         cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_${VERSION}.bin | ||||||
|  |          | ||||||
|  |         # Create SPIFFS binary | ||||||
|  |         cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin | ||||||
|  |          | ||||||
|  |         # Create full binary | ||||||
|  |         (cd .pio/build/esp32dev &&  | ||||||
|  |         esptool.py --chip esp32 merge_bin \ | ||||||
|  |           --fill-flash-size 4MB \ | ||||||
|  |           --flash_mode dio \ | ||||||
|  |           --flash_freq 40m \ | ||||||
|  |           --flash_size 4MB \ | ||||||
|  |           -o filaman_full_${VERSION}.bin \ | ||||||
|  |           0x1000 bootloader.bin \ | ||||||
|  |           0x8000 partitions.bin \ | ||||||
|  |           0x10000 firmware.bin \ | ||||||
|  |           0x390000 spiffs.bin) | ||||||
|  |          | ||||||
|  |         # Verify file sizes | ||||||
|  |         echo "File sizes:" | ||||||
|  |         (cd .pio/build/esp32dev && ls -lh *.bin) | ||||||
|  |      | ||||||
|  |     - name: Get version from platformio.ini | ||||||
|  |       id: get_version | ||||||
|  |       run: | | ||||||
|  |         VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2) | ||||||
|  |         echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||||||
|  |        | ||||||
|  |     - name: Read CHANGELOG.md | ||||||
|  |       id: changelog | ||||||
|  |       run: | | ||||||
|  |         VERSION=${{ steps.get_version.outputs.VERSION }} | ||||||
|  |         CHANGELOG=$(awk "/## \\[$VERSION\\]/{p=1;print;next} /## \\[/{p=0} p" CHANGELOG.md) | ||||||
|  |         echo "CHANGES<<EOF" >> $GITHUB_OUTPUT | ||||||
|  |         echo "$CHANGELOG" >> $GITHUB_OUTPUT | ||||||
|  |         echo "EOF" >> $GITHUB_OUTPUT | ||||||
|  |  | ||||||
|  |     - name: Create Gitea Release | ||||||
|  |       run: | | ||||||
|  |         VERSION=${{ steps.get_version.outputs.VERSION }} | ||||||
|  |         cd .pio/build/esp32dev | ||||||
|  |          | ||||||
|  |         # Prepare files for upload | ||||||
|  |         FILES="" | ||||||
|  |         for file in filaman_${VERSION}.bin webpage_${VERSION}.bin filaman_full_${VERSION}.bin; do | ||||||
|  |           if [ -f "$file" ]; then | ||||||
|  |             FILES="$FILES -a $file" | ||||||
|  |           fi | ||||||
|  |         done | ||||||
|  |          | ||||||
|  |         # Create release using git command | ||||||
|  |         git tag -a "v${VERSION}" -m "Release ${VERSION}" | ||||||
|  |         git push origin "v${VERSION}" | ||||||
| @@ -6,8 +6,8 @@ on: | |||||||
| jobs: | jobs: | ||||||
|   create-release: |   create-release: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     permissions: |     #permissions: | ||||||
|       contents: write |     #  contents: write | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v4 |     - uses: actions/checkout@v4 | ||||||
|      |      | ||||||
| @@ -60,31 +60,22 @@ jobs: | |||||||
|         # 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/filaman_${VERSION}.bin | ||||||
|          |          | ||||||
|         # Copy SPIFFS binary if SPIFFS changed |         # Always create SPIFFS binary | ||||||
|         if [[ "${{ steps.check_spiffs.outputs.SPIFFS_CHANGED }}" == "true" ]]; then |  | ||||||
|           echo "SPIFFS changes detected, copying SPIFFS binary..." |  | ||||||
|         cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin |         cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin | ||||||
|         fi |  | ||||||
|          |          | ||||||
|         # Create full binary (always) |         # Create full binary (always) | ||||||
|         (cd .pio/build/esp32dev && \ |         (cd .pio/build/esp32dev &&  | ||||||
|         esptool.py --chip esp32 merge_bin \ |         esptool.py --chip esp32 merge_bin \ | ||||||
|           --fill-flash-size 4MB \ |           --fill-flash-size 4MB \ | ||||||
|           --flash_mode dio \ |           --flash_mode dio \ | ||||||
|           --flash_freq 40m \ |           --flash_freq 40m \ | ||||||
|           --flash_size 4MB \ |           --flash_size 4MB \ | ||||||
|           -o filaman_full_${VERSION}.bin \ |           -o filaman_full_${VERSION}.bin \ | ||||||
|           0x0000 bootloader.bin \ |           0x1000 bootloader.bin \ | ||||||
|           0x8000 partitions.bin \ |           0x8000 partitions.bin \ | ||||||
|           0x10000 firmware.bin \ |           0x10000 firmware.bin \ | ||||||
|           0x390000 spiffs.bin) |           0x390000 spiffs.bin) | ||||||
|          |          | ||||||
|         # Only copy SPIFFS binary if data changed |  | ||||||
|         if [[ "${{ steps.check_data.outputs.DATA_CHANGED }}" == "true" ]]; then |  | ||||||
|           echo "Data changes detected, copying SPIFFS binary..." |  | ||||||
|           cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin |  | ||||||
|         fi |  | ||||||
|          |  | ||||||
|         # Verify file sizes |         # Verify file sizes | ||||||
|         echo "File sizes:" |         echo "File sizes:" | ||||||
|         (cd .pio/build/esp32dev && ls -lh *.bin) |         (cd .pio/build/esp32dev && ls -lh *.bin) | ||||||
							
								
								
									
										185
									
								
								.github/workflows/providers/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										185
									
								
								.github/workflows/providers/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,185 +0,0 @@ | |||||||
| name: Gitea Release |  | ||||||
|  |  | ||||||
| on: |  | ||||||
|   workflow_call: |  | ||||||
|     inputs: |  | ||||||
|       gitea_server_url: |  | ||||||
|         required: true |  | ||||||
|         type: string |  | ||||||
|       gitea_repository: |  | ||||||
|         required: true |  | ||||||
|         type: string |  | ||||||
|     secrets: |  | ||||||
|       GITEA_TOKEN: |  | ||||||
|         required: true |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   create-release: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|     - uses: actions/checkout@v4 |  | ||||||
|      |  | ||||||
|     - name: Set up Python |  | ||||||
|       uses: actions/setup-python@v4 |  | ||||||
|       with: |  | ||||||
|         python-version: '3.x' |  | ||||||
|      |  | ||||||
|     - name: Install PlatformIO |  | ||||||
|       run: | |  | ||||||
|         python -m pip install --upgrade pip |  | ||||||
|         pip install --upgrade platformio esptool |  | ||||||
|      |  | ||||||
|     - name: Install xxd |  | ||||||
|       run: | |  | ||||||
|         sudo apt-get update |  | ||||||
|         sudo apt-get install xxd |  | ||||||
|      |  | ||||||
|     - name: Check for SPIFFS changes |  | ||||||
|       id: check_spiffs |  | ||||||
|       run: | |  | ||||||
|         git fetch --unshallow || true |  | ||||||
|         CHANGED_FILES=$(git diff --name-only HEAD^..HEAD) |  | ||||||
|         if echo "$CHANGED_FILES" | grep -q "^data/\|^html/"; then |  | ||||||
|           echo "SPIFFS_CHANGED=true" >> $GITHUB_OUTPUT |  | ||||||
|         else |  | ||||||
|           echo "SPIFFS_CHANGED=false" >> $GITHUB_OUTPUT |  | ||||||
|         fi |  | ||||||
|      |  | ||||||
|     - name: Check for Data changes |  | ||||||
|       id: check_data |  | ||||||
|       run: | |  | ||||||
|         git fetch --unshallow || true |  | ||||||
|         CHANGED_FILES=$(git diff --name-only HEAD^..HEAD) |  | ||||||
|         if echo "$CHANGED_FILES" | grep -q "^data/"; then |  | ||||||
|           echo "DATA_CHANGED=true" >> $GITHUB_OUTPUT |  | ||||||
|         else |  | ||||||
|           echo "DATA_CHANGED=false" >> $GITHUB_OUTPUT |  | ||||||
|         fi |  | ||||||
|      |  | ||||||
|     - name: Get version from platformio.ini |  | ||||||
|       id: get_version |  | ||||||
|       run: | |  | ||||||
|         VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2) |  | ||||||
|         echo "VERSION=$VERSION" >> $GITHUB_OUTPUT |  | ||||||
|  |  | ||||||
|     - name: Build Firmware |  | ||||||
|       run: | |  | ||||||
|         VERSION=${{ steps.get_version.outputs.VERSION }} |  | ||||||
|          |  | ||||||
|         # Always build firmware and SPIFFS |  | ||||||
|         echo "Building firmware and SPIFFS..." |  | ||||||
|         pio run -e esp32dev |  | ||||||
|         pio run -t buildfs |  | ||||||
|          |  | ||||||
|         # Copy firmware binary |  | ||||||
|         cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_${VERSION}.bin |  | ||||||
|          |  | ||||||
|         # Copy SPIFFS binary if SPIFFS changed |  | ||||||
|         if [[ "${{ steps.check_spiffs.outputs.SPIFFS_CHANGED }}" == "true" ]]; then |  | ||||||
|           echo "SPIFFS changes detected, copying SPIFFS binary..." |  | ||||||
|           cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/webpage_${VERSION}.bin |  | ||||||
|         fi |  | ||||||
|          |  | ||||||
|         # Create full binary (always) |  | ||||||
|         (cd .pio/build/esp32dev && \ |  | ||||||
|         esptool.py --chip esp32 merge_bin \ |  | ||||||
|           --fill-flash-size 4MB \ |  | ||||||
|           --flash_mode dio \ |  | ||||||
|           --flash_freq 40m \ |  | ||||||
|           --flash_size 4MB \ |  | ||||||
|           -o filaman_full_${VERSION}.bin \ |  | ||||||
|           0x0000 bootloader.bin \ |  | ||||||
|           0x8000 partitions.bin \ |  | ||||||
|           0x10000 firmware.bin \ |  | ||||||
|           0x390000 spiffs.bin) |  | ||||||
|          |  | ||||||
|         # Verify file sizes |  | ||||||
|         echo "File sizes:" |  | ||||||
|         (cd .pio/build/esp32dev && ls -lh *.bin) |  | ||||||
|          |  | ||||||
|     - name: Prepare binaries |  | ||||||
|       run: | |  | ||||||
|         VERSION=${{ steps.get_version.outputs.VERSION }} |  | ||||||
|          |  | ||||||
|         # Create full binary only if SPIFFS changed |  | ||||||
|         if [[ "${{ steps.check_spiffs.outputs.SPIFFS_CHANGED }}" == "true" ]]; then |  | ||||||
|           echo "Creating full binary..." |  | ||||||
|           cd .pio/build/esp32dev && \ |  | ||||||
|           esptool.py --chip esp32 merge_bin \ |  | ||||||
|             --fill-flash-size 4MB \ |  | ||||||
|             --flash_mode dio \ |  | ||||||
|             --flash_freq 40m \ |  | ||||||
|             --flash_size 4MB \ |  | ||||||
|             -o filaman_full_${VERSION}.bin \ |  | ||||||
|             0x0000 bootloader.bin \ |  | ||||||
|             0x8000 partitions.bin \ |  | ||||||
|             0x10000 firmware.bin \ |  | ||||||
|             0x390000 spiffs.bin |  | ||||||
|         fi |  | ||||||
|          |  | ||||||
|         # Verify file sizes |  | ||||||
|         echo "File sizes:" |  | ||||||
|         cd .pio/build/esp32dev && ls -lh *.bin |  | ||||||
|  |  | ||||||
|     - name: Read CHANGELOG.md |  | ||||||
|       id: changelog |  | ||||||
|       run: | |  | ||||||
|         VERSION=${{ steps.get_version.outputs.VERSION }} |  | ||||||
|         CHANGELOG=$(awk "/## \\[$VERSION\\]/{p=1;print;next} /## \\[/{p=0} p" CHANGELOG.md) |  | ||||||
|         echo "CHANGES<<EOF" >> $GITHUB_OUTPUT |  | ||||||
|         echo "$CHANGELOG" >> $GITHUB_OUTPUT |  | ||||||
|         echo "EOF" >> $GITHUB_OUTPUT |  | ||||||
|          |  | ||||||
|     - name: Create Release |  | ||||||
|       env: |  | ||||||
|         TOKEN: ${{ secrets.GITEA_TOKEN }} |  | ||||||
|       run: | |  | ||||||
|         API_URL="${{ inputs.gitea_server_url }}/api/v1" |  | ||||||
|         REPO="${{ inputs.gitea_repository }}" |  | ||||||
|         VERSION=${{ steps.get_version.outputs.VERSION }} |  | ||||||
|          |  | ||||||
|         # Create release |  | ||||||
|         RESPONSE=$(curl -k -s \ |  | ||||||
|           -X POST \ |  | ||||||
|           -H "Authorization: token ${TOKEN}" \ |  | ||||||
|           -H "Content-Type: application/json" \ |  | ||||||
|           -d "{ |  | ||||||
|             \"tag_name\":\"v${VERSION}\", |  | ||||||
|             \"name\":\"Release ${VERSION}\", |  | ||||||
|             \"body\":\"${{ steps.changelog.outputs.CHANGES }}\" |  | ||||||
|           }" \ |  | ||||||
|           "${API_URL}/repos/${REPO}/releases") |  | ||||||
|          |  | ||||||
|         RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | cut -d':' -f2 | head -n1) |  | ||||||
|          |  | ||||||
|         if [ -n "$RELEASE_ID" ]; then |  | ||||||
|           echo "Release created with ID: $RELEASE_ID" |  | ||||||
|            |  | ||||||
|           # Always upload firmware and full binary |  | ||||||
|           for file in filaman_${VERSION}.bin filaman_full_${VERSION}.bin; do |  | ||||||
|             if [ -f ".pio/build/esp32dev/$file" ]; then |  | ||||||
|               echo "Uploading $file..." |  | ||||||
|               curl -k -s \ |  | ||||||
|                 -X POST \ |  | ||||||
|                 -H "Authorization: token ${TOKEN}" \ |  | ||||||
|                 -H "Content-Type: application/octet-stream" \ |  | ||||||
|                 --data-binary "@.pio/build/esp32dev/$file" \ |  | ||||||
|                 "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=$file" |  | ||||||
|             fi |  | ||||||
|           done |  | ||||||
|            |  | ||||||
|           # Upload SPIFFS binary only if it exists (data changes) |  | ||||||
|           if [ -f ".pio/build/esp32dev/webpage_${VERSION}.bin" ]; then |  | ||||||
|             echo "Uploading webpage binary..." |  | ||||||
|             curl -k -s \ |  | ||||||
|               -X POST \ |  | ||||||
|               -H "Authorization: token ${TOKEN}" \ |  | ||||||
|               -H "Content-Type: application/octet-stream" \ |  | ||||||
|               --data-binary "@.pio/build/esp32dev/webpage_${VERSION}.bin" \ |  | ||||||
|               "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=webpage_${VERSION}.bin" |  | ||||||
|           fi |  | ||||||
|         else |  | ||||||
|           echo "Failed to create release. Response:" |  | ||||||
|           echo "$RESPONSE" |  | ||||||
|           exit 1 |  | ||||||
|         fi |  | ||||||
							
								
								
									
										54
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										54
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -6,65 +6,27 @@ on: | |||||||
|       - 'v*' |       - 'v*' | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   route: |   detect-provider: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     outputs: |     outputs: | ||||||
|       provider: ${{ steps.provider.outputs.provider }} |       provider: ${{ steps.provider.outputs.provider }} | ||||||
|       gitea_ref_name: ${{ steps.provider.outputs.gitea_ref_name }} |  | ||||||
|       gitea_server_url: ${{ steps.provider.outputs.gitea_server_url }} |  | ||||||
|       gitea_repository: ${{ steps.provider.outputs.gitea_repository }} |  | ||||||
|     steps: |     steps: | ||||||
|       - name: Checkout Repository |  | ||||||
|         uses: actions/checkout@v3 |  | ||||||
|  |  | ||||||
|       - name: Debug Environment |  | ||||||
|         run: | |  | ||||||
|           echo "CI Environment Details:" |  | ||||||
|           echo "GITHUB_ACTIONS=${GITHUB_ACTIONS:-not set}" |  | ||||||
|           echo "GITEA_ACTIONS=${GITEA_ACTIONS:-not set}" |  | ||||||
|           echo "GITEA_REPOSITORY=${GITEA_REPOSITORY:-not set}" |  | ||||||
|           echo "GITEA_SERVER_URL=${GITEA_SERVER_URL:-not set}" |  | ||||||
|           echo "RUNNER_NAME=${RUNNER_NAME:-not set}" |  | ||||||
|  |  | ||||||
|       - name: Determine CI Provider |       - name: Determine CI Provider | ||||||
|         id: provider |         id: provider | ||||||
|         shell: bash |         shell: bash | ||||||
|         run: | |         run: | | ||||||
|           if [ -n "${GITEA_ACTIONS}" ] || [ -n "${GITEA_REPOSITORY}" ] || [[ "${RUNNER_NAME}" == *"gitea"* ]]; then |           if [ -n "${GITEA_ACTIONS}" ] || [ -n "${GITEA_REPOSITORY}" ] || [[ "${RUNNER_NAME}" == *"gitea"* ]]; then | ||||||
|             echo "provider=gitea" >> "$GITHUB_OUTPUT" |             echo "provider=gitea" >> "$GITHUB_OUTPUT" | ||||||
|             echo "gitea_ref_name=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" |  | ||||||
|             echo "gitea_server_url=${GITHUB_SERVER_URL}" >> "$GITHUB_OUTPUT" |  | ||||||
|             echo "gitea_repository=${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT" |  | ||||||
|           elif [ "${GITHUB_ACTIONS}" = "true" ]; then |  | ||||||
|             echo "provider=github" >> "$GITHUB_OUTPUT" |  | ||||||
|           else |           else | ||||||
|             echo "provider=unknown" >> "$GITHUB_OUTPUT" |             echo "provider=github" >> "$GITHUB_OUTPUT" | ||||||
|           fi |  | ||||||
|  |  | ||||||
|   verify-provider: |  | ||||||
|     needs: route |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - name: Echo detected provider |  | ||||||
|         run: | |  | ||||||
|           echo "Detected CI Provider: ${{ needs.route.outputs.provider }}" |  | ||||||
|           if [ "${{ needs.route.outputs.provider }}" = "unknown" ]; then |  | ||||||
|             echo "::error::Failed to detect CI provider!" |  | ||||||
|             exit 1 |  | ||||||
|           fi |           fi | ||||||
|  |  | ||||||
|   github-release: |   github-release: | ||||||
|     needs: [route, verify-provider] |     needs: detect-provider | ||||||
|     if: needs.route.outputs.provider == 'github' |     if: needs.detect-provider.outputs.provider == 'github' | ||||||
|     uses: ./.github/workflows/providers/github-release.yml |     uses: ./.github/workflows/github-release.yml | ||||||
|  |  | ||||||
|   gitea-release: |   gitea-release: | ||||||
|     needs: [route, verify-provider] |     needs: detect-provider | ||||||
|     if: needs.route.outputs.provider == 'gitea' |     if: needs.detect-provider.outputs.provider == 'gitea' | ||||||
|     uses: ./.github/workflows/providers/gitea-release.yml |     uses: ./.github/workflows/gitea-release.yml | ||||||
|     with: |  | ||||||
|       gitea_ref_name: ${{ needs.route.outputs.gitea_ref_name }} |  | ||||||
|       gitea_server_url: ${{ needs.route.outputs.gitea_server_url }} |  | ||||||
|       gitea_repository: ${{ needs.route.outputs.gitea_repository }} |  | ||||||
|     secrets: |  | ||||||
|       GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} |  | ||||||
							
								
								
									
										103
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										103
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,5 +1,108 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
|  | ## [1.3.11] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.11 | ||||||
|  | - ci: refactor Gitea release workflow by simplifying input handling and removing unnecessary checks | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.10] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.10 | ||||||
|  | - ci: simplify GitHub release workflow by removing provider verification step | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.9] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.9 | ||||||
|  | - ci: comment out permissions for GitHub release workflow | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.8] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - add Gitea and GitHub release workflows | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.8 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.7] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - add GitHub and Gitea release workflows | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.7 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.6] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.6 | ||||||
|  |  | ||||||
|  | ### Fixed | ||||||
|  | - update GitHub token reference and correct file path in release workflow | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.5] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - enhance release workflow to support Gitea alongside GitHub | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.5 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.4] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - add Gitea and GitHub release workflows | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.4 | ||||||
|  | - Merge branch 'old' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.3] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.3 | ||||||
|  |  | ||||||
|  | ### Fixed | ||||||
|  | - correct directory path in GitHub workflows for SPIFFS binary | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.2] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - add missing conditional exit in release workflow | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.2 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.1] - 2025-02-21 | ||||||
|  | ### Added | ||||||
|  | - enhance GitHub and Gitea release workflows with Python setup and binary preparation | ||||||
|  |  | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.3.1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.3.0] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - bump version to 1.3.0 in platformio.ini | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.2.102] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.2.102 | ||||||
|  |  | ||||||
|  | ### Fixed | ||||||
|  | - adjust bootloader offset in binary merge for Gitea and GitHub workflows | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## [1.2.101] - 2025-02-21 | ||||||
|  | ### Changed | ||||||
|  | - update webpages for version v1.2.101 | ||||||
|  | - always create SPIFFS binary in release workflows | ||||||
|  | - migrate calibration value storage from EEPROM to NVS | ||||||
|  |  | ||||||
|  |  | ||||||
| ## [1.2.100] - 2025-02-21 | ## [1.2.100] - 2025-02-21 | ||||||
| ### Changed | ### Changed | ||||||
| - update webpages for version v1.2.100 | - update webpages for version v1.2.100 | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
| ; https://docs.platformio.org/page/projectconf.html | ; https://docs.platformio.org/page/projectconf.html | ||||||
|  |  | ||||||
| [common] | [common] | ||||||
| version = "1.2.100" | version = "1.3.11" | ||||||
|  |  | ||||||
| [env:esp32dev] | [env:esp32dev] | ||||||
| platform = espressif32 | platform = espressif32 | ||||||
|   | |||||||
| @@ -3,9 +3,9 @@ | |||||||
| #include <ArduinoJson.h> | #include <ArduinoJson.h> | ||||||
| #include "config.h" | #include "config.h" | ||||||
| #include "HX711.h" | #include "HX711.h" | ||||||
| #include <EEPROM.h> |  | ||||||
| #include "display.h" | #include "display.h" | ||||||
| #include "esp_task_wdt.h" | #include "esp_task_wdt.h" | ||||||
|  | #include <Preferences.h> | ||||||
|  |  | ||||||
| HX711 scale; | HX711 scale; | ||||||
|  |  | ||||||
| @@ -17,6 +17,10 @@ uint8_t weigthCouterToApi = 0; | |||||||
| uint8_t scale_tare_counter = 0; | uint8_t scale_tare_counter = 0; | ||||||
| uint8_t pauseMainTask = 0; | uint8_t pauseMainTask = 0; | ||||||
|  |  | ||||||
|  | Preferences preferences; | ||||||
|  | const char* NVS_NAMESPACE = "scale"; | ||||||
|  | const char* NVS_KEY_CALIBRATION = "cal_value"; | ||||||
|  |  | ||||||
| // ##### Funktionen für Waage ##### | // ##### Funktionen für Waage ##### | ||||||
| uint8_t tareScale() { | uint8_t tareScale() { | ||||||
|   Serial.println("Tare scale"); |   Serial.println("Tare scale"); | ||||||
| @@ -48,13 +52,12 @@ void scale_loop(void * parameter) { | |||||||
|  |  | ||||||
| void start_scale() { | void start_scale() { | ||||||
|   Serial.println("Prüfe Calibration Value"); |   Serial.println("Prüfe Calibration Value"); | ||||||
|   long calibrationValue; // calibration value (see example file "Calibration.ino") |   long calibrationValue; | ||||||
|   //calibrationValue = 696.0; // uncomment this if you want to set the calibration value in the sketch |  | ||||||
|  |  | ||||||
|   EEPROM.begin(512); |   // NVS | ||||||
|   EEPROM.get(calVal_eepromAdress, calibrationValue); // uncomment this if you want to fetch the calibration value from eeprom |   preferences.begin(NVS_NAMESPACE, true); // true = readonly | ||||||
|  |   calibrationValue = preferences.getLong(NVS_KEY_CALIBRATION, defaultScaleCalibrationValue); | ||||||
|   //calibrationValue = EEPROM.read(calVal_eepromAdress); |   preferences.end(); | ||||||
|  |  | ||||||
|   Serial.print("Read Scale Calibration Value "); |   Serial.print("Read Scale Calibration Value "); | ||||||
|   Serial.println(calibrationValue); |   Serial.println(calibrationValue); | ||||||
| @@ -137,18 +140,19 @@ uint8_t calibrate_scale() { | |||||||
|     { |     { | ||||||
|       Serial.print("New calibration value has been set to: "); |       Serial.print("New calibration value has been set to: "); | ||||||
|       Serial.println(newCalibrationValue); |       Serial.println(newCalibrationValue); | ||||||
|       Serial.print("Save this value to EEPROM adress "); |  | ||||||
|       Serial.println(calVal_eepromAdress); |  | ||||||
|  |  | ||||||
|       //EEPROM.put(calVal_eepromAdress, newCalibrationValue); |       // Speichern mit NVS | ||||||
|       EEPROM.put(calVal_eepromAdress, newCalibrationValue); |       preferences.begin(NVS_NAMESPACE, false); // false = readwrite | ||||||
|       EEPROM.commit(); |       preferences.putLong(NVS_KEY_CALIBRATION, newCalibrationValue); | ||||||
|  |       preferences.end(); | ||||||
|  |  | ||||||
|       EEPROM.get(calVal_eepromAdress, newCalibrationValue); |       // Verifizieren | ||||||
|       //newCalibrationValue = EEPROM.read(calVal_eepromAdress); |       preferences.begin(NVS_NAMESPACE, true); | ||||||
|  |       long verifyValue = preferences.getLong(NVS_KEY_CALIBRATION, 0); | ||||||
|  |       preferences.end(); | ||||||
|  |  | ||||||
|       Serial.print("Read Value "); |       Serial.print("Verified stored value: "); | ||||||
|       Serial.println(newCalibrationValue); |       Serial.println(verifyValue); | ||||||
|  |  | ||||||
|       Serial.println("End calibration, revome weight"); |       Serial.println("End calibration, revome weight"); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user