mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-22 19:08:51 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf2780bce6 |
No files matched your search
@@ -42,12 +42,12 @@ jobs:
|
|||||||
libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev \
|
libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev \
|
||||||
libgl1-mesa-dev libgtk-3-dev
|
libgl1-mesa-dev libgtk-3-dev
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
|
|
||||||
# Only main saves caches; PRs restore main's, so PR caches don't evict main's.
|
# Only main saves caches; PRs restore main's, so PR caches don't evict main's.
|
||||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
@@ -75,10 +75,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: wasm32-unknown-unknown
|
targets: wasm32-unknown-unknown
|
||||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
key: wasm32
|
key: wasm32
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ if has appimage; then
|
|||||||
if [ -z "$TOOL" ]; then
|
if [ -z "$TOOL" ]; then
|
||||||
TOOL="$CARGO_TARGET_DIR/appimagetool-$ARCH.AppImage"
|
TOOL="$CARGO_TARGET_DIR/appimagetool-$ARCH.AppImage"
|
||||||
if [ ! -x "$TOOL" ]; then
|
if [ ! -x "$TOOL" ]; then
|
||||||
curl -fsSL -o "$TOOL" "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage"
|
curl --proto '=https' -fsSL -o "$TOOL" "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage"
|
||||||
chmod +x "$TOOL"
|
chmod +x "$TOOL"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ FILES="$HERE" # where the units and the Caddyfile come from
|
|||||||
from_release() { # download and check the release archive; sets NEW_BIN and FILES
|
from_release() { # download and check the release archive; sets NEW_BIN and FILES
|
||||||
local version="$VERSION" name dir
|
local version="$VERSION" name dir
|
||||||
if [ -z "$version" ]; then
|
if [ -z "$version" ]; then
|
||||||
version="$(curl -fsSL "https://api.github.com/repos/$REPO/releases/latest" | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p' | head -n 1)" || return 1
|
version="$(curl --proto '=https' -fsSL "https://api.github.com/repos/$REPO/releases/latest" | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p' | head -n 1)" || return 1
|
||||||
[ -n "$version" ] || return 1
|
[ -n "$version" ] || return 1
|
||||||
fi
|
fi
|
||||||
name="figcraft-server-$version-linux-$ARCH"
|
name="figcraft-server-$version-linux-$ARCH"
|
||||||
@@ -155,8 +155,8 @@ from_release() { # download and check the release archive; sets NEW_BIN and FILE
|
|||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
say "Downloading $name"
|
say "Downloading $name"
|
||||||
curl -fsSL -o "$dir/$name.tar.gz" "https://github.com/$REPO/releases/download/v$version/$name.tar.gz" || return 1
|
curl --proto '=https' -fsSL -o "$dir/$name.tar.gz" "https://github.com/$REPO/releases/download/v$version/$name.tar.gz" || return 1
|
||||||
curl -fsSL -o "$dir/SHA256SUMS.txt" "https://github.com/$REPO/releases/download/v$version/SHA256SUMS.txt" || return 1
|
curl --proto '=https' -fsSL -o "$dir/SHA256SUMS.txt" "https://github.com/$REPO/releases/download/v$version/SHA256SUMS.txt" || return 1
|
||||||
(cd "$dir" && grep " $name.tar.gz\$" SHA256SUMS.txt | sha256sum -c --quiet -) || die "the download doesn't match SHA256SUMS.txt"
|
(cd "$dir" && grep " $name.tar.gz\$" SHA256SUMS.txt | sha256sum -c --quiet -) || die "the download doesn't match SHA256SUMS.txt"
|
||||||
tar -C "$dir" -xzf "$dir/$name.tar.gz"
|
tar -C "$dir" -xzf "$dir/$name.tar.gz"
|
||||||
NEW_BIN="$dir/$name/figcraft-server"
|
NEW_BIN="$dir/$name/figcraft-server"
|
||||||
|
|||||||
Reference in new issue
Block a user