diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a6da7f..271365f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,10 +58,15 @@ jobs: with: submodules: recursive - - name: set guppyscreen version + - if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + name: set guppyscreen nightly version run: | - chmod +x ./version.sh - ./version.sh >> $GITHUB_ENV + echo "GUPPYSCREEN_VERSION=nightly-${{ github.sha }}" >> $GITHUB_ENV + + - if: startsWith(github.ref, 'refs/tags/') + name: set guppyscreen nightly version + run: | + echo "GUPPYSCREEN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV - if: matrix.small name: export screen size @@ -126,3 +131,11 @@ jobs: tag_name: nightly files: ${{ matrix.asset }}.tar.gz fail_on_unmatched_files: true + + - name: stable release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ matrix.asset }}.tar.gz + generate_release_notes: true + fail_on_unmatched_files: true diff --git a/README.md b/README.md index 5c59b28..70af8bf 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,34 @@ sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/bal sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer.sh)" -s zbolt ``` +### Install on a PI (Debian/Raspbian) +Tested on a BTT Pad 7. Please install with care and make sure you're okay with resetting your setup if things break. +``` +wget -O - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer-deb.sh | bash +``` + +### Nightly Builds +#### Material (Nightly) +``` +sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer.sh)" -s nightly +``` + +#### Z-Bolt (Nightly) +``` +sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer.sh)" -s zbolt nightly +``` + +#### Raspbian Variant (Nightly) +``` +wget -O - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer-deb.sh | bash -s nightly +``` + ## Uninstall ssh into your K1/Max and run the follwow command: ``` /usr/data/guppyscreen/reinstall-creality.sh ``` -### Install on aarch64 (Debian Bullseye) - Experimental -Tested on a BTT Pad 7. Please install with care and make sure you're okay with resetting your setup if things break. -``` -wget -O - https://raw.githubusercontent.com/ballaswag/guppyscreen/main/installer-deb.sh | bash -``` ## Features :white_check_mark: Console/Macro Shell diff --git a/installer-deb.sh b/installer-deb.sh index 7b585aa..3b05cf4 100755 --- a/installer-deb.sh +++ b/installer-deb.sh @@ -98,13 +98,18 @@ restart_services() { ARCH=`uname -m` -CODENAME=`lsb_release -c -s` # expect debian bulleye for now -echo "Found arch $ARCH, OS code name $CODENAME" +echo "Found arch $ARCH" -if [ "$ARCH" = "aarch64" ] && [ "$CODENAME" = "bullseye" ]; then +if [ "$ARCH" = "aarch64" ]; then printf "${green}Installing Guppy Screen ${white}\n" + + ASSET_URL="https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen-arm.tar.gz" + if [ "$1" = "nightly" ]; then + printf "${yellow}Installing nightly build ${white}\n" + ASSET_URL="https://github.com/ballaswag/guppyscreen/releases/download/nightly/guppyscreen-arm.tar.gz" + fi - curl -s -L https://github.com/ballaswag/guppyscreen/releases/latest/download/guppyscreen-arm.tar.gz -o /tmp/guppyscreen.tar.gz + curl -s -L $ASSET_URL -o /tmp/guppyscreen.tar.gz tar xf /tmp/guppyscreen.tar.gz -C ${HOME} has_moonraker diff --git a/installer.sh b/installer.sh index 53cb482..01bb6e3 100755 --- a/installer.sh +++ b/installer.sh @@ -83,10 +83,17 @@ rm -rf /root/.cache wget -q --no-check-certificate https://raw.githubusercontent.com/ballaswag/k1-discovery/main/bin/curl -O /tmp/curl chmod +x /tmp/curl +ASSET_URL="https://github.com/ballaswag/guppyscreen/releases/latest/download/$ASSET_NAME.tar.gz" + +if [ "$1" = "nightly" ] || [ "$2" = "nightly" ]; then + printf "${yellow}Installing nightly build ${white}\n" + ASSET_URL="https://github.com/ballaswag/guppyscreen/releases/download/nightly/$ASSET_NAME.tar.gz" +fi + printf "${green} Downloading asset: $ASSET_NAME.tar.gz ${white}\n" # download/extract latest guppyscreen -/tmp/curl -s -L "https://github.com/ballaswag/guppyscreen/releases/latest/download/$ASSET_NAME.tar.gz" -o /tmp/guppyscreen.tar.gz +/tmp/curl -s -L $ASSET_URL -o /tmp/guppyscreen.tar.gz tar xf /tmp/guppyscreen.tar.gz -C /usr/data/ if [ ! -f "$K1_GUPPY_DIR/guppyscreen" ]; then diff --git a/release.sh b/release.sh index 06256fc..5d67261 100755 --- a/release.sh +++ b/release.sh @@ -21,5 +21,5 @@ cp -r ./debian $RELEASES_DIR cp ./build/bin/kd_graphic_mode $RELEASES_DIR/debian -echo "{\"version\": \"$VERSION_STR\", \"theme\": \"$GUPPY_THEME\", \"asset_name\": \"$ASSET_NAME.tar.gz\"}" > $RELEASES_DIR/.version +echo "{\"version\": \"$GUPPYSCREEN_VERSION\", \"theme\": \"$GUPPY_THEME\", \"asset_name\": \"$ASSET_NAME.tar.gz\"}" > $RELEASES_DIR/.version tar czf $ASSET_NAME.tar.gz -C releases .