Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
79b189d
Create create-beta.yml
XanXic Jan 23, 2025
986f131
Update create-beta.yml
XanXic Jan 23, 2025
3851742
Update create-beta.yml
XanXic Jan 23, 2025
66b9f6e
Adding theme garden icon
XanXic Jan 23, 2025
e40b2fd
Updating packaged themes
XanXic Jan 23, 2025
f3a0e89
scraper display timing tweak; remove governor manipulation
ryanmsartor Jan 23, 2025
b9f5bc1
Merge branch 'threethreetwo' of https://github.com/spruceUI/spruceOS …
ryanmsartor Jan 23, 2025
bedc3a9
Add files via upload
Sundownersport Jan 24, 2025
fc27506
Adding new feature to unpacker, making theme unpacker install themes …
XanXic Jan 26, 2025
2757a61
Adding beta mode to OTA app
XanXic Jan 26, 2025
6effbcc
Adding beta handling to EZUpdater
XanXic Jan 26, 2025
37d0409
Updating firstboot message, fixing flag remove
XanXic Jan 26, 2025
9d26804
Adding beta detection and handling to update checker and auto update …
XanXic Jan 26, 2025
073c537
Adding icon to theme garden info panels
XanXic Jan 26, 2025
1e37aae
Fixing get button press not reliably detecting select/start
XanXic Jan 26, 2025
974357f
Added re-download all themes function, Improving theme packer dialogues
XanXic Jan 26, 2025
a1fe0b7
Adding a theme sorter to alphabetize installed themes
XanXic Jan 26, 2025
afc2272
Improving some actions
XanXic Jan 26, 2025
b93cbbc
Add files via upload
Sundownersport Jan 26, 2025
5e33fce
Update themeGarden.sh
Sundownersport Jan 26, 2025
324bdd3
Rename themegarden.png to themegallery.png
Sundownersport Jan 27, 2025
93cfc84
Update themeGarden.sh
Sundownersport Jan 27, 2025
4a1e4af
Add files via upload
Sundownersport Jan 28, 2025
636a866
move simple mode watchdog from standard_launch.sh into principal.sh.
ryanmsartor Feb 3, 2025
c8c8600
Merge branch 'threethreetwo' of https://github.com/spruceUI/spruceOS …
ryanmsartor Feb 3, 2025
ad56081
Fixed low power warning not communicating proper
XanXic Feb 4, 2025
e844b0a
Merge main
XanXic Feb 4, 2025
38cda63
Adding hide/show theme garden setting
XanXic Feb 4, 2025
5ea9ddb
kill simple mode watchdog on cmd_to_run, and revivify it after the cm…
ryanmsartor Feb 4, 2025
4b10d37
Add files via upload
Sundownersport Feb 4, 2025
bc4b519
Update Avocado.7z
XanXic Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 76 additions & 11 deletions .github/workflows/create-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ name: Create Beta Release
on:
workflow_dispatch:
inputs:
action_type:
description: 'Action to perform'
required: true
type: choice
options:
- create
- delete
default: 'create'
target_branch:
description: 'Branch to create beta from'
required: true
required: false
default: 'Development'
type: string

Expand All @@ -14,6 +22,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event.inputs.action_type == 'create'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -46,10 +55,10 @@ jobs:
- name: Check for commits
id: check_commits
run: |
# Get all commits
COMMITS=$(git log --pretty=format:'- %s (%an)%n')
# Get commits from last 24 hours
COMMITS=$(git log --since="24 hours ago" --pretty=format:'- %s (%an)%n')
if [ -z "$COMMITS" ]; then
echo "No commits found"
echo "No commits found in the last 24 hours"
exit 1
fi
{
Expand Down Expand Up @@ -83,7 +92,9 @@ jobs:
-x!.gitattributes \
-x!create_spruce_release.bat \
-x!create_spruce_release.sh \
-x!commits_beta.txt
-x!commits_beta.txt \
-x!spruce/flags/developer_mode \
-x!spruce/flags/developer_mode.lock
# Add the commits file separately to place it at the root
7z u "spruceV${{ steps.get_version.outputs.version }}.7z" commits_beta.txt

Expand Down Expand Up @@ -151,14 +162,68 @@ jobs:
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
# Get all releases sorted by created date (newest first)
RELEASES=$(gh api repos/spruceUI/spruceOSNightlies/releases --paginate | jq -r '.[].id')
# Get all beta releases
BETA_RELEASES=$(gh api repos/spruceUI/spruceOSNightlies/releases --paginate | jq -r '.[] | select(.tag_name | contains("-beta")) | .id')

# Convert to array and keep only releases after the first 3
# Convert to array and keep only the newest beta
COUNT=0
for RELEASE_ID in $RELEASES; do
for RELEASE_ID in $BETA_RELEASES; do
COUNT=$((COUNT + 1))
if [ $COUNT -gt 3 ]; then
if [ $COUNT -gt 1 ]; then
gh api repos/spruceUI/spruceOSNightlies/releases/$RELEASE_ID -X DELETE
fi
done
done

delete-beta:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event.inputs.action_type == 'delete'
steps:
- name: Delete beta releases
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
# Get and delete all beta releases
BETA_RELEASES=$(gh api repos/spruceUI/spruceOSNightlies/releases --paginate | jq -r '.[] | select(.tag_name | contains("-Beta")) | .id')
for RELEASE_ID in $BETA_RELEASES; do
gh api repos/spruceUI/spruceOSNightlies/releases/$RELEASE_ID -X DELETE
done

- name: Clone and update OTA repos
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
# Clone both repositories
git clone https://github.com/spruceUI/spruceui.github.io.git ota_repo
git clone https://github.com/spruceUI/spruceSource.git source_repo

# Function to update OTA file
update_ota_file() {
local file="$1"
local content
content=$(cat "$file")

# Remove BETA_ lines while preserving others
echo "$content" | grep -v "^BETA_" > "$file"
}

# Update both OTA files
update_ota_file "ota_repo/OTA/spruce"
update_ota_file "source_repo/OTA/spruce"

# Update primary OTA repo
cd ota_repo
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
git add OTA/spruce
git commit -m "Remove beta release information"
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/spruceUI/spruceui.github.io.git main

# Update backup OTA repo
cd ../source_repo
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
git add OTA/spruce
git commit -m "Remove beta release information"
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/spruceUI/spruceSource.git main
5 changes: 3 additions & 2 deletions .github/workflows/create-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ jobs:
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
# Get all releases sorted by created date (newest first)
RELEASES=$(gh api repos/spruceUI/spruceOSNightlies/releases --paginate | jq -r '.[].id')
# Get all releases and filter out beta releases
RELEASES=$(gh api repos/spruceUI/spruceOSNightlies/releases --paginate | \
jq -r '.[] | select(.tag_name | contains("-Beta") | not) | .id')

# Convert to array and keep only releases after the first 3
COUNT=0
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,25 @@ jobs:
- Fixed some bugs

******

## Updating
## Downloads:

*****
[Fresh Install click here](https://github.com/spruceUI/spruceOS/releases/download/v${{ steps.get_version.outputs.version }}/spruceV${{ steps.get_version.outputs.version }}.zip)

[Fresh Install instructions](https://github.com/spruceUI/spruceOS/wiki/Installation-Instructions)
[Wiki instructions](https://github.com/spruceUI/spruceOS/wiki/01.-Installation-Instructions)

*****
[Update from 3.0.0 or newer click here](https://github.com/spruceUI/spruceOS/releases/download/v${{ steps.get_version.outputs.version }}/spruceV${{ steps.get_version.outputs.version }}.7z)

[Update from 3.0.0 or newer instructions](https://github.com/spruceUI/spruceOS/wiki/Updating-to-the-Latest-Release#ez-updater-for-spruce-vversions-300-and-above)
[Wiki instructions](https://github.com/spruceUI/spruceOS/wiki/02.-Updating-to-the-Latest-Release#ez-updater-for-spruce-versions-300-and-above)

*****
[Update from pre-3.0.0 click here](https://github.com/spruceUI/spruceOS/releases/download/v${{ steps.get_version.outputs.version }}/EZ.Updater.spruceV${{ steps.get_version.outputs.version }}.zip)

[Update from pre-3.0.0 instructions](https://github.com/spruceUI/spruceOS/wiki/Updating-to-the-Latest-Release#ez-updater-for-spruce--versions-230-and-below)
[Wiki instructions](https://github.com/spruceUI/spruceOS/wiki/02.-Updating-to-the-Latest-Release#ez-updater-for-spruce--versions-230-and-below)

*****


Credits/Thanks
repository: spruceUI/spruceOS
token: ${{ secrets.PAT_TOKEN }}
Expand Down
100 changes: 49 additions & 51 deletions App/-OTA/downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,80 +76,78 @@ BETA_LINK=$(sed -n 's/BETA_LINK=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_SIZE=$(sed -n 's/BETA_SIZE_IN_MB=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_INFO=$(sed -n 's/BETA_INFO=//p' "$TMP_DIR/spruce" | tr -d '\n\r')

# Function to offer version choice
offer_version() {
local prompt="$1"
local version1="$2"
local version1_name="$3"
local version2="$4"
local version2_name="$5"

display --icon "$IMAGE_PATH" -t "$prompt
$version1_name: $version1
$version2_name: $version2" -p 220 --confirm
confirm
return $?
}

# Set default target to release
TARGET_VERSION="$RELEASE_VERSION"
TARGET_CHECKSUM="$RELEASE_CHECKSUM"
TARGET_LINK="$RELEASE_LINK"
TARGET_SIZE="$RELEASE_SIZE"
TARGET_INFO="$RELEASE_INFO"

# Handle developer and tester mode selections
# Function to set target version
set_target() {
local version="$1"
local checksum="$2"
local link="$3"
local size="$4"
local info="$5"

TARGET_VERSION="$version"
TARGET_CHECKSUM="$checksum"
TARGET_LINK="$link"
TARGET_SIZE="$size"
TARGET_INFO="$info"
}

# Handle version selection based on flags
if flag_check "developer_mode"; then
# Developer mode: offer nightly -> beta -> release
display --icon "$IMAGE_PATH" -t "Developer mode detected. Would you like to use the latest nightly build?
Latest nightly: $NIGHTLY_VERSION
$([ -n "$BETA_VERSION" ] && echo "Beta release: $BETA_VERSION")
Public release: $RELEASE_VERSION" -p 220 --confirm
if confirm; then
TARGET_VERSION="$NIGHTLY_VERSION"
TARGET_CHECKSUM="$NIGHTLY_CHECKSUM"
TARGET_LINK="$NIGHTLY_LINK"
TARGET_SIZE="$NIGHTLY_SIZE"
TARGET_INFO="$NIGHTLY_INFO"
if offer_version "Developer mode detected. Would you like to use the latest nightly build?" "$NIGHTLY_VERSION" "Latest nightly" "$RELEASE_VERSION" "Public release"; then
set_target "$NIGHTLY_VERSION" "$NIGHTLY_CHECKSUM" "$NIGHTLY_LINK" "$NIGHTLY_SIZE" "$NIGHTLY_INFO"
elif [ -n "$BETA_VERSION" ]; then
display --icon "$IMAGE_PATH" -t "Would you like to use the beta build instead?
Beta version: $BETA_VERSION
Public release: $RELEASE_VERSION" -p 220 --confirm
if confirm; then
TARGET_VERSION="$BETA_VERSION"
TARGET_CHECKSUM="$BETA_CHECKSUM"
TARGET_LINK="$BETA_LINK"
TARGET_SIZE="$BETA_SIZE"
TARGET_INFO="$BETA_INFO"
if offer_version "Would you like to use the beta build instead?" "$BETA_VERSION" "Beta version" "$RELEASE_VERSION" "Public release"; then
set_target "$BETA_VERSION" "$BETA_CHECKSUM" "$BETA_LINK" "$BETA_SIZE" "$BETA_INFO"
fi
fi
elif flag_check "beta"; then
# Beta mode: offer beta (if exists) -> release
if [ -n "$BETA_VERSION" ]; then
if offer_version "Beta mode detected. Would you like to use the beta build?" "$BETA_VERSION" "Beta version" "$RELEASE_VERSION" "Public release"; then
set_target "$BETA_VERSION" "$BETA_CHECKSUM" "$BETA_LINK" "$BETA_SIZE" "$BETA_INFO"
fi
fi
elif flag_check "tester_mode"; then
# Tester mode: offer beta (if exists) -> nightly -> release
if [ -n "$BETA_VERSION" ]; then
display --icon "$IMAGE_PATH" -t "Tester mode detected. Would you like to use the beta build?
Beta version: $BETA_VERSION
Public release: $RELEASE_VERSION" -p 220 --confirm
if confirm; then
TARGET_VERSION="$BETA_VERSION"
TARGET_CHECKSUM="$BETA_CHECKSUM"
TARGET_LINK="$BETA_LINK"
TARGET_SIZE="$BETA_SIZE"
TARGET_INFO="$BETA_INFO"
else
display --icon "$IMAGE_PATH" -t "Would you like to use the latest nightly instead?
Latest nightly: $NIGHTLY_VERSION
Public release: $RELEASE_VERSION" -p 220 --confirm
if confirm; then
TARGET_VERSION="$NIGHTLY_VERSION"
TARGET_CHECKSUM="$NIGHTLY_CHECKSUM"
TARGET_LINK="$NIGHTLY_LINK"
TARGET_SIZE="$NIGHTLY_SIZE"
TARGET_INFO="$NIGHTLY_INFO"
fi
if offer_version "Tester mode detected. Would you like to use the beta build?" "$BETA_VERSION" "Beta version" "$RELEASE_VERSION" "Public release"; then
set_target "$BETA_VERSION" "$BETA_CHECKSUM" "$BETA_LINK" "$BETA_SIZE" "$BETA_INFO"
elif offer_version "Would you like to use the latest nightly instead?" "$NIGHTLY_VERSION" "Latest nightly" "$RELEASE_VERSION" "Public release"; then
set_target "$NIGHTLY_VERSION" "$NIGHTLY_CHECKSUM" "$NIGHTLY_LINK" "$NIGHTLY_SIZE" "$NIGHTLY_INFO"
fi
else
# No beta available, offer nightly
display --icon "$IMAGE_PATH" -t "Tester mode detected. Would you like to use the latest nightly build?
Latest nightly: $NIGHTLY_VERSION
Public release: $RELEASE_VERSION" -p 220 --confirm
if confirm; then
TARGET_VERSION="$NIGHTLY_VERSION"
TARGET_CHECKSUM="$NIGHTLY_CHECKSUM"
TARGET_LINK="$NIGHTLY_LINK"
TARGET_SIZE="$NIGHTLY_SIZE"
TARGET_INFO="$NIGHTLY_INFO"
if offer_version "Tester mode detected. Would you like to use the latest nightly build?" "$NIGHTLY_VERSION" "Latest nightly" "$RELEASE_VERSION" "Public release"; then
set_target "$NIGHTLY_VERSION" "$NIGHTLY_CHECKSUM" "$NIGHTLY_LINK" "$NIGHTLY_SIZE" "$NIGHTLY_INFO"
fi
fi
fi

SKIP_VERSION_CHECK=false
# Set SKIP_VERSION_CHECK to true if developer mode or tester mode is enabled
if flag_check "developer_mode" || flag_check "tester_mode"; then
if flag_check "developer_mode" || flag_check "tester_mode" || flag_check "beta"; then
SKIP_VERSION_CHECK=true
fi

Expand Down
54 changes: 45 additions & 9 deletions App/-OTA/downloaderFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ check_for_update() {
done

# Get current version based on mode
if flag_check "developer_mode" || flag_check "tester_mode"; then
CURRENT_VERSION=$(get_version_nightly)
if flag_check "developer_mode" || flag_check "tester_mode" || flag_check "beta"; then
CURRENT_VERSION=$(get_version_complex)
else
CURRENT_VERSION=$(get_version)
fi
Expand Down Expand Up @@ -90,26 +90,62 @@ check_for_update() {
NIGHTLY_LINK=$(sed -n 's/NIGHTLY_LINK=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
NIGHTLY_SIZE=$(sed -n 's/NIGHTLY_SIZE_IN_MB=//p' "$TMP_DIR/spruce" | tr -d '\n\r')

# Extract beta info
BETA_VERSION=$(sed -n 's/BETA_VERSION=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_CHECKSUM=$(sed -n 's/BETA_CHECKSUM=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_LINK=$(sed -n 's/BETA_LINK=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_SIZE=$(sed -n 's/BETA_SIZE_IN_MB=//p' "$TMP_DIR/spruce" | tr -d '\n\r')
BETA_INFO=$(sed -n 's/BETA_INFO=//p' "$TMP_DIR/spruce" | tr -d '\n\r')

# Set target version based on developer/tester mode
TARGET_VERSION="$RELEASE_VERSION"
if flag_check "beta"; then
TARGET_VERSION="$BETA_VERSION"
fi

if flag_check "developer_mode" || flag_check "tester_mode"; then
TARGET_VERSION="$NIGHTLY_VERSION"
fi

# Compare versions, handling nightly date format
# Compare versions, handling nightly date format and beta versions
log_message "Update Check: Comparing versions: $TARGET_VERSION vs $CURRENT_VERSION"

# Extract base version and date for nightly builds
# Extract base version, date, and beta status
current_base_version=$(echo "$CURRENT_VERSION" | cut -d'-' -f1)
current_date=$(echo "$CURRENT_VERSION" | cut -d'-' -f2 -s)
current_suffix=$(echo "$CURRENT_VERSION" | cut -d'-' -f2 -s)
current_is_beta=$(echo "$current_suffix" | grep -q "Beta" && echo "1" || echo "0")
current_date=$(echo "$current_suffix" | grep -qE "^[0-9]{8}$" && echo "$current_suffix" || echo "")

target_base_version=$(echo "$TARGET_VERSION" | cut -d'-' -f1)
target_date=$(echo "$TARGET_VERSION" | cut -d'-' -f2 -s)
target_suffix=$(echo "$TARGET_VERSION" | cut -d'-' -f2 -s)
target_is_beta=$(echo "$target_suffix" | grep -q "Beta" && echo "1" || echo "0")
target_date=$(echo "$target_suffix" | grep -qE "^[0-9]{8}$" && echo "$target_suffix" || echo "")

update_available=0
if [ "$(echo "$target_base_version $current_base_version" | awk '{split($1,a,"."); split($2,b,"."); for (i=1; i<=3; i++) {if (a[i]<b[i]) {print $2; exit} else if (a[i]>b[i]) {print $1; exit}} print $2}')" != "$current_base_version" ]; then
update_available=1
elif [ -n "$current_date" ] && [ -n "$target_date" ] && [ "$target_date" -gt "$current_date" ]; then

# Compare base versions first
version_higher=$(echo "$target_base_version $current_base_version" | awk '{split($1,a,"."); split($2,b,"."); for (i=1; i<=3; i++) {if (a[i]<b[i]) {print "0"; exit} else if (a[i]>b[i]) {print "1"; exit}} print "0"}')

if [ "$version_higher" = "1" ]; then
# Target version is higher, always consider it an update
update_available=1
elif [ "$version_higher" = "0" ] && [ "$target_base_version" = "$current_base_version" ]; then
# Same base version, check suffixes
if flag_check "developer_mode" || flag_check "tester_mode"; then
# For testers/developers, nightlies are updates
if [ -n "$target_date" ] && [ -n "$current_date" ] && [ "$target_date" -gt "$current_date" ]; then
update_available=1
fi
elif flag_check "beta"; then
# Beta mode logic
if [ "$current_is_beta" = "1" ]; then
# Currently on beta, only higher base versions are updates
update_available=0
elif [ "$target_is_beta" = "1" ]; then
# Not on beta, but target is beta - consider it an update
update_available=1
fi
fi
fi

if [ $update_available -eq 1 ]; then
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading