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:
Generated
+1
-1
@@ -1179,7 +1179,7 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wakey"
|
name = "wakey"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"axum-extra",
|
"axum-extra",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "wakey"
|
name = "wakey"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
publish = ["gitea"]
|
publish = ["gitea"]
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -4,7 +4,7 @@ This folder has small helpers for build, CI, and router install. Keep it simple;
|
|||||||
|
|
||||||
## Quick start (recommended)
|
## 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
|
```powershell
|
||||||
./scripts/act_runner.ps1
|
./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.
|
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
|
```powershell
|
||||||
git tag v0.1.0
|
./scripts/publish.ps1 -Tag
|
||||||
git push origin v0.1.0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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:
|
Use the release asset URL from your Gitea Release page:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
# 0th step from lda is to move the pre assed resolv.conf to the real resolv.conf
|
# 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
|
# 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)
|
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
|
cd /var/tmp
|
||||||
|
|
||||||
[ -f "$LATEST" ] && {
|
|
||||||
|
if [ -f "$LATEST" ]; then
|
||||||
echo "file exists"
|
echo "file exists"
|
||||||
rm "$LATEST"
|
rm "$LATEST"
|
||||||
}
|
fi
|
||||||
|
|
||||||
echo "Downloading $LATEST..."
|
echo "Downloading $LATEST..."
|
||||||
wget -q "$URL"
|
wget -q "$URL"
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ main() {
|
|||||||
"$STAGING/etc/init.d/"* \
|
"$STAGING/etc/init.d/"* \
|
||||||
"$STAGING/etc/ldlda_help/"*.sh \
|
"$STAGING/etc/ldlda_help/"*.sh \
|
||||||
"$STAGING/root/.bin/wakey" \
|
"$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
|
[ -e "$f" ] && chmod +x "$f" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
+22
-1
@@ -10,12 +10,24 @@ param(
|
|||||||
[string]$Version,
|
[string]$Version,
|
||||||
[switch]$Tag,
|
[switch]$Tag,
|
||||||
[switch]$Publish
|
[switch]$Publish
|
||||||
[switch]$ForceTag,
|
|
||||||
[string]$Registry
|
[string]$Registry
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = 'Stop'
|
$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) {
|
if ($Version) {
|
||||||
$pattern = '(?m)^version\s*=\s*"[^"]+"'
|
$pattern = '(?m)^version\s*=\s*"[^"]+"'
|
||||||
$replacement = ('version = "{0}"' -f $Version)
|
$replacement = ('version = "{0}"' -f $Version)
|
||||||
@@ -39,6 +51,15 @@ if ($Publish) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($Tag -and $Version) {
|
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 tag -f "v$Version"
|
||||||
git push -f origin "v$Version"
|
git push -f origin "v$Version"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,22 +67,6 @@ struct DhcpLeasesQueryRaw {
|
|||||||
include_state: Option<String>,
|
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 {
|
async fn get_dhcp_leases(Query(raw): Query<DhcpLeasesQueryRaw>) -> impl IntoResponse {
|
||||||
let include_state = raw
|
let include_state = raw
|
||||||
.include_state
|
.include_state
|
||||||
|
|||||||
@@ -169,3 +169,7 @@ a {
|
|||||||
.dot.warn {
|
.dot.warn {
|
||||||
background: var(--warn);
|
background: var(--warn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preview:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user