so this is release 0.1.1

added dev push that make life easier (thanks copilot)
change scripts to use LF instead of crlf (again)
added more Bullshits (also thanks? to copilot)
made a mac -> name cache
rename stuff / move stuff
use an advanced ass parsing that reflects nothing and jus waste compute time.
idk man shi
This commit is contained in:
lda
2025-08-26 22:23:07 +07:00 Unverified
parent 9de286f59b
commit d971a3921c
8 changed files with 59 additions and 43 deletions
Generated
+1 -1
View File
@@ -1179,7 +1179,7 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "wakey"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"axum",
"axum-extra",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey"
version = "0.1.0"
version = "0.1.1"
edition = "2024"
publish = ["gitea"]
+6 -5
View File
@@ -4,7 +4,7 @@ This folder has small helpers for build, CI, and router install. Keep it simple;
## Quick start (recommended)
1. Start your Gitea runner on this Windows PC
1. Start your Gitea runner on this Windows PC (if not already running):
```powershell
./scripts/act_runner.ps1
@@ -12,14 +12,15 @@ This folder has small helpers for build, CI, and router install. Keep it simple;
If first-time, it prints the exact register command. Run it once, check labels include `windows:host,self-hosted`, then rerun the script.
1. Tag and push to trigger CI
2. Publish, tag, and push (recommended):
```powershell
git tag v0.1.0
git push origin v0.1.0
./scripts/publish.ps1 -Tag
```
1. Install on the router
This will bump the version (if you specify one), build, ensure the runner is started, tag, and push. To also publish to the registry, add `-Publish`.
3. Install on the router
Use the release asset URL from your Gitea Release page:
+8 -3
View File
@@ -2,7 +2,11 @@
set -e
# 0th step from lda is to move the pre assed resolv.conf to the real resolv.conf
[ -f /tmp/resolv.conf ] && cp -af /tmp/resolv.conf /etc/resolv.conf || ([ -f /rom/etc/resolv.conf ] && cp -af /rom/etc/resolv.conf /etc/resolv.conf)
if [ -f /tmp/resolv.conf ]; then
cp -af /tmp/resolv.conf /etc/resolv.conf
elif [ -f /rom/etc/resolv.conf ]; then
cp -af /rom/etc/resolv.conf /etc/resolv.conf
fi
# 1. Fetch the latest version number from Tailscale's site
LATEST=$(curl -s https://pkgs.tailscale.com/stable/ | grep -Eo 'tailscale_[0-9\.]+_arm.tgz' | head -n1)
@@ -16,10 +20,11 @@ URL="https://pkgs.tailscale.com/stable/${LATEST}"
cd /var/tmp
[ -f "$LATEST" ] && {
if [ -f "$LATEST" ]; then
echo "file exists"
rm "$LATEST"
}
fi
echo "Downloading $LATEST..."
wget -q "$URL"
+2 -1
View File
@@ -100,7 +100,8 @@ main() {
"$STAGING/etc/init.d/"* \
"$STAGING/etc/ldlda_help/"*.sh \
"$STAGING/root/.bin/wakey" \
"$STAGING/root/.bin/kill_wakey.sh"; do
"$STAGING/root/.bin/kill_wakey.sh" \
"$STAGING/root/.bin/remote_deploy_wakey.sh"; do
[ -e "$f" ] && chmod +x "$f" 2>/dev/null || true
done
+22 -1
View File
@@ -10,12 +10,24 @@ param(
[string]$Version,
[switch]$Tag,
[switch]$Publish
[switch]$ForceTag,
[string]$Registry
)
$ErrorActionPreference = 'Stop'
# If no version provided, deduce from Cargo.toml
if (-not $Version) {
$cargoToml = Get-Content Cargo.toml -Raw
if ($cargoToml -match 'version\s*=\s*"([^"]+)"') {
$Version = $matches[1]
Write-Host "Deduced version from Cargo.toml: $Version"
}
else {
Write-Error "Could not deduce version from Cargo.toml. Please specify -Version."
exit 1
}
}
if ($Version) {
$pattern = '(?m)^version\s*=\s*"[^"]+"'
$replacement = ('version = "{0}"' -f $Version)
@@ -39,6 +51,15 @@ if ($Publish) {
}
if ($Tag -and $Version) {
# If you git push a tag, this will trigger the act_runner and the release workflow on your self-hosted runner (see .gitea/workflows/release.yml)
$actRunnerScript = Join-Path (Split-Path -Parent $PSScriptRoot) 'act_runner.ps1'
if (Test-Path $actRunnerScript) {
Write-Host "Ensuring act_runner is running..."
& $actRunnerScript
}
else {
Write-Warning "act_runner.ps1 not found at $actRunnerScript. Skipping runner start."
}
git tag -f "v$Version"
git push -f origin "v$Version"
}
-16
View File
@@ -67,22 +67,6 @@ struct DhcpLeasesQueryRaw {
include_state: Option<String>,
}
// #[skip_serializing_none]
// #[derive(Debug, Clone, serde::Serialize)]
// struct DhcpLeaseOut {
// expires_epoch: u64,
// ip: IpAddr,
// #[serde(serialize_with = "serialize_mac")]
// mac: macaddr::MacAddr,
// // #[serde(skip_serializing_if = "Option::is_none")]
// name: Option<String>,
// // extras
// // #[serde(skip_serializing_if = "Option::is_none")]
// nud_state: Option<NUDState>,
// // #[serde(skip_serializing_if = "Option::is_none")]
// rank: Option<u8>,
// }
async fn get_dhcp_leases(Query(raw): Query<DhcpLeasesQueryRaw>) -> impl IntoResponse {
let include_state = raw
.include_state
+4
View File
@@ -169,3 +169,7 @@ a {
.dot.warn {
background: var(--warn);
}
#preview:empty {
display: none;
}