Files
wakey/scripts
T
lda 9aa1c44246
release / build (push) Failing after 1m31s
i still dont know
9aa1c44246 · 2025-08-25 05:12:11 +07:00
History
..
2025-08-25 03:57:04 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 05:12:11 +07:00
2025-08-25 05:12:11 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 03:02:20 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 03:57:04 +07:00
2025-08-25 03:57:04 +07:00
2025-08-21 22:15:09 +07:00
2025-08-25 03:57:04 +07:00

Scripts

This folder contains helper scripts for building, packaging, releasing, and deploying wakey.

Overview

  • act_runner.ps1 — Starts your local Gitea runner as a background daemon on Windows.
  • cross_build.ps1 — Cross-compiles the project using cross for one or more Linux targets.
  • package.ps1 — Builds a developer-friendly tarball/zip containing binaries and init scripts.
  • package_rootfs.ps1 — Builds a router-ready rootfs tarball that can be installed via wget | tar.
  • release.ps1 — One-shot helper to cross build and package.
  • publish.ps1 — Optional: bump version in Cargo.toml, build, cargo publish, and tag the repo.
  • init/openwrt/* — OpenWrt init scripts (procd) to run wakey and other helpers.
  • systemd/wakey.service — A basic systemd unit for Linux hosts.

act_runner.ps1

Starts the Gitea act_runner if it isn't already running.

  • Default paths assume ~/Documents/gitea/act_runner.exe and config at ~/Documents/gitea/.runner.
  • Usage:
./scripts/act_runner.ps1
# or specify custom paths
./scripts/act_runner.ps1 -RunnerPath "C:/Users/Admin/Documents/gitea/act_runner.exe" -Config "C:/Users/Admin/Documents/gitea/.runner"

cross_build.ps1

Cross-compile with cross for the targets you need.

  • Requires cross installed (cargo install cross).
  • Usage:
./scripts/cross_build.ps1 -Release -Targets armv7-unknown-linux-musleabihf

package.ps1

Create a developer bundle with binaries and init scripts. Doesnt layout files for / directly.

./scripts/package.ps1 -Version 0.1.0 -Targets armv7-unknown-linux-musleabihf

Artifacts in dist/wakey-<version>.(tgz|zip).

package_rootfs.ps1

Create a router-ready rootfs tarball that installs with a one-liner.

./scripts/package_rootfs.ps1 -Version 0.1.0 -Target armv7-unknown-linux-musleabihf

This writes dist/wakey-rootfs-<version>-<target>.tgz containing:

  • root/.bin/wakey
  • etc/init.d/wakey (and any other scripts under scripts/init/openwrt)

Install on OpenWrt:

wget -O- <URL>/wakey-rootfs-<version>-<target>.tgz | tar -xz -C /
chmod +x /etc/init.d/wakey
/etc/init.d/wakey enable
/etc/init.d/wakey start

release.ps1

One-shot:

./scripts/release.ps1 -Version 0.1.0 -Targets armv7-unknown-linux-musleabihf

publish.ps1

Optional helper to bump the version, build release, publish the crate, and tag the repo.

./scripts/publish.ps1 -Version 0.1.0 -Tag
  • If youre not publishing to crates.io, the cargo publish step will warn and continue.
  • Uses a simple regex replace to update the version = "…" line in Cargo.toml.

CI workflow (Gitea)

A workflow in .gitea/workflows/release.yml is provided:

  • Triggers on tag pushes (v*) and manual dispatch.
  • Builds with cross on your self-hosted Windows runner.
  • Packages a rootfs tarball.
  • Publishes a Gitea release via API, attaching the tarball (requires secrets.GITEA_TOKEN).

Once published, you can install on the router with:

wget -O- <release-asset-URL> | tar -xz -C /

Adjust paths and targets as needed for your environment.