Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
akasaka committed Oct 26, 2024
2 parents 88de9d7 + 4ce19f3 commit d4eb5d4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build production version

on:
push:
branches: [main, develop]
branches: [main]

jobs:
build-everything:
Expand Down Expand Up @@ -35,11 +35,24 @@ jobs:
if-no-files-found: error
- name: Delete WIP tunes
run: rm ./data/music/wip_*.pomf
- name: Add FS version into the file system
run: echo "$(git rev-parse --short HEAD)" > ./data/FS_VER
- name: Create LittleFS image
run: pio run --target buildfs --environment music-pomf
- name: Upload filesystem image
uses: actions/upload-artifact@v4
with:
path: ./.pio/build/music-pomf/littlefs.bin
name: filesystem.zip
if-no-files-found: error
if-no-files-found: error
- name: Switch to public branch
run: git checkout pub
- name: Merge changes from main
run: git merge main
- name: Move things to FVUDATA for publishing
run: ./helper/ci/create_fvudata.sh
- name: Add FVUDATA stuff into git and push
run: |
git add -f ./webroot/fvudata/*
git commit -m "Publish firmwares at $(git rev-parse --short HEAD)"
git push --force -u origin pub
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ captures/
/lib/nonfree-aquestalk/*.a
/data/music/wip*.pomf
/data/music/WIP*.pomf
/webroot/fvudata/*
33 changes: 33 additions & 0 deletions helper/ci/create_fvudata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Directory containing the folders to check
source_dir="./.pio/build"
# Target directory for copied files
target_dir="./webroot/fvudata"

# Create the target directory if it doesn't exist
mkdir -p "$target_dir"

cp "./.pio/build/music-pomf/littlefs.bin" "$target_dir/fs.bin"
cp "./data/FS_VER" "$target_dir/fs_ver.txt"

# Iterate over each entry in the source directory
for entry in "$source_dir"/*; do
# Check if the entry is a directory
if [ -d "$entry" ]; then
# Define the path to firmware.bin inside the current directory
firmware_file="$entry/firmware.bin"

# Check if firmware.bin exists in the current directory
if [ -f "$firmware_file" ]; then
# Get the name of the directory (basename)
folder_name=$(basename "$entry")

# Copy and rename firmware.bin to the target directory
cp "$firmware_file" "$target_dir/$folder_name.bin"
echo "Copied $firmware_file to $target_dir/$folder_name.bin"
else
echo "No firmware.bin found in $entry"
fi
fi
done

0 comments on commit d4eb5d4

Please sign in to comment.