Compare commits
	
		
			15 Commits
		
	
	
		
			v1.3.25
			...
			7e53e1ccb0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7e53e1ccb0 | |||
| e49e812b13 | |||
| b1e0fcfadf | |||
| 31ef3ac8df | |||
| 8cf3f87c89 | |||
| c446188311 | |||
| 8e2a8d597d | |||
| 7d3b1c34f6 | |||
| b95c61118b | |||
| 0dfb158959 | |||
| 75c774bb24 | |||
| cf80adb43c | |||
| 36d50cbe7f | |||
| 9148d207c7 | |||
| 5f6fef9448 | 
							
								
								
									
										98
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										98
									
								
								.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:
 | 
				
			||||||
@@ -36,8 +40,9 @@ jobs:
 | 
				
			|||||||
        # Copy firmware binary
 | 
					        # Copy firmware binary
 | 
				
			||||||
        cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${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/upgrade_filaman_website_v${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 && 
 | 
				
			||||||
@@ -102,63 +107,60 @@ jobs:
 | 
				
			|||||||
        GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }}
 | 
					        GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }}
 | 
				
			||||||
        GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }}
 | 
					        GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }}
 | 
				
			||||||
      run: |
 | 
					      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
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        # Debug-Ausgaben
 | 
					        # Debug-Ausgaben
 | 
				
			||||||
        echo "Debug: Checking API URL..."
 | 
					        echo "Debug: API URL: ${GITEA_API_URL}"
 | 
				
			||||||
        echo "GITEA_API_URL=${GITEA_API_URL}"
 | 
					        echo "Debug: Repository: ${GITEA_OWNER}/${GITEA_REPO}"
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        # Prepare files for upload
 | 
					        # Erstelle zuerst den Release ohne Dateien
 | 
				
			||||||
        FILES=""
 | 
					 | 
				
			||||||
        for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
 | 
					 | 
				
			||||||
          if [ -f "$file" ]; then
 | 
					 | 
				
			||||||
            FILES="$FILES -a $file"
 | 
					 | 
				
			||||||
            echo "Debug: Found file: $file"
 | 
					 | 
				
			||||||
          fi
 | 
					 | 
				
			||||||
        done
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        # Check if tag exists
 | 
					 | 
				
			||||||
        if ! git rev-parse "v${VERSION}" >/dev/null 2>&1; then
 | 
					 | 
				
			||||||
          echo "Debug: Creating new tag v${VERSION}"
 | 
					 | 
				
			||||||
          git tag -a "v${VERSION}" -m "Release ${VERSION}"
 | 
					 | 
				
			||||||
          git push origin "v${VERSION}"
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
          echo "Debug: Tag v${VERSION} already exists"
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Test API connection
 | 
					 | 
				
			||||||
        echo "Debug: Testing API connection..."
 | 
					 | 
				
			||||||
        TEST_RESPONSE=$(curl -s -w "\n%{http_code}" -H "Authorization: token ${GITEA_TOKEN}" "${GITEA_API_URL}/api/v1/version")
 | 
					 | 
				
			||||||
        TEST_STATUS=$(echo "$TEST_RESPONSE" | tail -n1)
 | 
					 | 
				
			||||||
        if [ "$TEST_STATUS" != "200" ]; then
 | 
					 | 
				
			||||||
          echo "Error: Cannot connect to Gitea API"
 | 
					 | 
				
			||||||
          echo "Response: $TEST_RESPONSE"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Create Gitea release using API
 | 
					 | 
				
			||||||
        echo "Debug: Creating release..."
 | 
					        echo "Debug: Creating release..."
 | 
				
			||||||
        RELEASE_DATA="{
 | 
					        RELEASE_DATA="{\"tag_name\":\"v${VERSION}\",\"name\":\"v${VERSION}\",\"body\":\"${{ steps.changelog.outputs.CHANGES }}\"}"
 | 
				
			||||||
          \"tag_name\": \"v${VERSION}\",
 | 
					 | 
				
			||||||
          \"name\": \"v${VERSION}\",
 | 
					 | 
				
			||||||
          \"body\": \"${{ steps.changelog.outputs.CHANGES }}\"
 | 
					 | 
				
			||||||
        }"
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        # Create release and capture HTTP status
 | 
					        RELEASE_RESPONSE=$(curl -s -w "\n%{http_code}" \
 | 
				
			||||||
        RESPONSE=$(curl -v -s -w "\n%{http_code}" -X POST \
 | 
					          -X POST \
 | 
				
			||||||
          -H "Authorization: token ${GITEA_TOKEN}" \
 | 
					          -H "Authorization: token ${GITEA_TOKEN}" \
 | 
				
			||||||
          -H "Content-Type: application/json" \
 | 
					          -H "Content-Type: application/json" \
 | 
				
			||||||
          -d "$RELEASE_DATA" \
 | 
					          -d "${RELEASE_DATA}" \
 | 
				
			||||||
          "${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
 | 
					          "${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
 | 
					        RELEASE_STATUS=$(echo "$RELEASE_RESPONSE" | tail -n1)
 | 
				
			||||||
        RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
 | 
					        RELEASE_BODY=$(echo "$RELEASE_RESPONSE" | head -n -1)
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        echo "Debug: HTTP Status: $HTTP_STATUS"
 | 
					        if [ "$RELEASE_STATUS" != "201" ]; then
 | 
				
			||||||
        echo "Debug: Response Body: $RESPONSE_BODY"
 | 
					          echo "Error: Failed to create release"
 | 
				
			||||||
 | 
					          echo "Response: $RELEASE_BODY"
 | 
				
			||||||
        if [ "$HTTP_STATUS" != "201" ]; then
 | 
					 | 
				
			||||||
          echo "Fehler beim Erstellen des Releases: $RESPONSE_BODY"
 | 
					 | 
				
			||||||
          exit 1
 | 
					          exit 1
 | 
				
			||||||
        fi
 | 
					        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
 | 
				
			||||||
							
								
								
									
										5
									
								
								.github/workflows/github-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/github-release.yml
									
									
									
									
										vendored
									
									
								
							@@ -69,8 +69,9 @@ jobs:
 | 
				
			|||||||
        # Copy firmware binary
 | 
					        # Copy firmware binary
 | 
				
			||||||
        cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${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/upgrade_filaman_website_v${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 && 
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@@ -37,3 +37,5 @@ jobs:
 | 
				
			|||||||
    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 }}
 | 
				
			||||||
							
								
								
									
										34
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -1,5 +1,39 @@
 | 
				
			|||||||
# 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
 | 
					## [1.3.25] - 2025-02-21
 | 
				
			||||||
### Changed
 | 
					### Changed
 | 
				
			||||||
- update webpages for version v1.3.25
 | 
					- update webpages for version v1.3.25
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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,7 @@
 | 
				
			|||||||
; https://docs.platformio.org/page/projectconf.html
 | 
					; https://docs.platformio.org/page/projectconf.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[common]
 | 
					[common]
 | 
				
			||||||
version = "1.3.25"
 | 
					version = "1.3.30"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#test
 | 
					#test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user