docs: link to latest Releases on Gitea; release notes updated (en)
This commit is contained in:
@@ -30,6 +30,10 @@ Disclaimer: *This plugin was partially vibe-coded*.
|
|||||||
5. Configure the plugin settings in OctoPrint's settings panel
|
5. Configure the plugin settings in OctoPrint's settings panel
|
||||||
6. Enable Funnel through the plugin interface
|
6. Enable Funnel through the plugin interface
|
||||||
|
|
||||||
|
### Latest Release
|
||||||
|
|
||||||
|
Get the latest packaged release (wheel, sdist, zip) from Gitea: [Releases](https://gitea.elpatron.me/elpatron/octo-funnel/releases)
|
||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
If you want to build the plugin from source, please refer to the [BUILDING.md](BUILDING.md) file for detailed instructions.
|
If you want to build the plugin from source, please refer to the [BUILDING.md](BUILDING.md) file for detailed instructions.
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Usage: scripts/release_gitea.sh <version> [--draft] [--prerelease]
|
# Usage: scripts/release_gitea.sh <version> [--draft] [--prerelease]
|
||||||
# Requires: GITEA_TOKEN, GITEA_BASE (e.g. https://gitea.elpatron.me), OWNER (e.g. elpatron), REPO (e.g. octo-funnel)
|
# Env: liest automatisch $ROOT_DIR/.env (GITEA_TOKEN, GITEA_BASE, OWNER, REPO)
|
||||||
|
# Falls nicht gesetzt, werden GITEA_BASE/OWNER/REPO aus der Git-Remote-URL abgeleitet.
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]; then
|
if [[ $# -lt 1 ]]; then
|
||||||
echo "Usage: $0 <version> [--draft] [--prerelease]" >&2
|
echo "Usage: $0 <version> [--draft] [--prerelease]" >&2
|
||||||
@@ -20,12 +21,49 @@ for arg in "$@"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
: "${GITEA_TOKEN:?Set GITEA_TOKEN}"
|
|
||||||
: "${GITEA_BASE:?Set GITEA_BASE (e.g. https://gitea.elpatron.me)}"
|
|
||||||
: "${OWNER:?Set OWNER (e.g. elpatron)}"
|
|
||||||
: "${REPO:?Set REPO (e.g. octo-funnel)}"
|
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
||||||
|
|
||||||
|
# Load .env if present
|
||||||
|
if [[ -f "$ROOT_DIR/.env" ]]; then
|
||||||
|
set -a
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
. "$ROOT_DIR/.env"
|
||||||
|
set +a
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Map alternative token variable name
|
||||||
|
if [[ -z "${GITEA_TOKEN:-}" && -n "${GITEA_API_TOKEN:-}" ]]; then
|
||||||
|
GITEA_TOKEN="$GITEA_API_TOKEN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Map API URL to base if provided
|
||||||
|
if [[ -z "${GITEA_BASE:-}" && -n "${GITEA_API_URL:-}" ]]; then
|
||||||
|
# strip trailing /api/... from URL
|
||||||
|
GITEA_BASE="${GITEA_API_URL%%/api/*}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Map owner/repo alternative names
|
||||||
|
if [[ -z "${OWNER:-}" && -n "${GITEA_OWNER:-}" ]]; then
|
||||||
|
OWNER="$GITEA_OWNER"
|
||||||
|
fi
|
||||||
|
if [[ -z "${REPO:-}" && -n "${GITEA_REPO:-}" ]]; then
|
||||||
|
REPO="$GITEA_REPO"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Derive defaults from git remote if not provided
|
||||||
|
if [[ -z "${GITEA_BASE:-}" || -z "${OWNER:-}" || -z "${REPO:-}" ]]; then
|
||||||
|
ORIGIN_URL=$(git -C "$ROOT_DIR" remote get-url origin 2>/dev/null || true)
|
||||||
|
if [[ "$ORIGIN_URL" =~ ^https?://([^/]+)/([^/]+)/([^/]+?)(\.git)?$ ]]; then
|
||||||
|
: "${GITEA_BASE:="https://${BASH_REMATCH[1]}"}"
|
||||||
|
: "${OWNER:=${BASH_REMATCH[2]}}"
|
||||||
|
: "${REPO:=${BASH_REMATCH[3]}}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
: "${GITEA_TOKEN:?Set GITEA_TOKEN (in .env oder Umgebung)}"
|
||||||
|
: "${GITEA_BASE:?Set GITEA_BASE (z. B. https://gitea.elpatron.me)}"
|
||||||
|
: "${OWNER:?Set OWNER (z. B. elpatron)}"
|
||||||
|
: "${REPO:?Set REPO (z. B. octo-funnel)}"
|
||||||
DIST_DIR="$ROOT_DIR/octoprint_tailscale_funnel/dist"
|
DIST_DIR="$ROOT_DIR/octoprint_tailscale_funnel/dist"
|
||||||
|
|
||||||
TAG="v${VERSION}"
|
TAG="v${VERSION}"
|
||||||
@@ -67,6 +105,7 @@ if [[ -z "$ID" || "$ID" == "null" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Release created: ID=$ID"
|
echo "Release created: ID=$ID"
|
||||||
|
echo "Using: GITEA_BASE=$GITEA_BASE OWNER=$OWNER REPO=$REPO"
|
||||||
|
|
||||||
function upload_asset() {
|
function upload_asset() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
|
Reference in New Issue
Block a user