Update version to 0.1.6

Add Gitea package registry support

Add publish-dmg target for versioned DMG uploads

Update deploy-dmg to include Gitea publishing

Document Gitea token requirements in README
This commit is contained in:
2026-06-15 16:52:24 +07:00
parent 39bb8e5fee
commit 372dd7123a
6 changed files with 45 additions and 9 deletions
Generated
+5 -5
View File
@@ -869,7 +869,7 @@ dependencies = [
[[package]]
name = "spacesh-cli"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"anyhow",
"clap",
@@ -881,7 +881,7 @@ dependencies = [
[[package]]
name = "spacesh-core"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"alacritty_terminal",
"serde",
@@ -891,7 +891,7 @@ dependencies = [
[[package]]
name = "spacesh-proto"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"bytes",
"serde",
@@ -903,7 +903,7 @@ dependencies = [
[[package]]
name = "spacesh-pty"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"anyhow",
"bytes",
@@ -913,7 +913,7 @@ dependencies = [
[[package]]
name = "spaceshd"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"anyhow",
"base64",
+1 -1
View File
@@ -10,7 +10,7 @@ members = [
[workspace.package]
edition = "2021"
version = "0.1.3"
version = "0.1.6"
[workspace.dependencies]
tokio = { version = "1", features = ["full"] }
+25 -1
View File
@@ -17,6 +17,12 @@ LANDING_VERSION := $(shell cat landing/VERSION 2>/dev/null || echo 0.0.0)
REGISTRY ?= git.realmanual.ru
REPO ?= spacesh
# ---- Gitea generic package registry (versioned .dmg downloads) ----
GITEA_URL ?= https://git.realmanual.ru
GITEA_OWNER ?= realmanual
GITEA_PKG ?= spacesh
GITEA_TOKEN ?= # token with package:write; pass via env/CLI, never commit
# ---- Prod deploy (SSH) ----
SSH_HOST ?= 192.168.8.5
SSH_USER ?= root
@@ -134,7 +140,7 @@ landing-push: landing-image ## tag & push the landing image to the registry
# ---- Prod deploy ----
.PHONY: deploy-dmg
deploy-dmg: dmg ## upload the .dmg + update manifest (latest.json) to the prod download dir
deploy-dmg: dmg ## upload .dmg + manifest to prod, and publish the versioned .dmg to Gitea Packages
@VER=$$(node -p "require('./$(APP_DIR)/src-tauri/tauri.conf.json').version"); \
printf '{"version":"%s","url":"https://spaceshell.ru/download/spacesh.dmg"}\n' "$$VER" > /tmp/spacesh-latest.json; \
echo "manifest version → $$VER"
@@ -142,6 +148,24 @@ deploy-dmg: dmg ## upload the .dmg + update manifest (latest.json) to the prod d
scp $(SSH_OPTS) $(DMG_DIR)/*.dmg "$(SSH_USER)@$(SSH_HOST):$(SSH_REMOTE_DIR)/download/spacesh.dmg"
scp $(SSH_OPTS) /tmp/spacesh-latest.json "$(SSH_USER)@$(SSH_HOST):$(SSH_REMOTE_DIR)/download/latest.json"
@echo "Uploaded → https://spaceshell.ru/download/spacesh.dmg + latest.json"
@$(MAKE) --no-print-directory _publish-dmg
.PHONY: publish-dmg
publish-dmg: dmg _publish-dmg ## build + publish the versioned .dmg to the Gitea package registry
# Internal: upload the most recently built .dmg to Gitea's generic registry under
# the current version. No build dependency, so deploy-dmg can call it without a
# second bump/rebuild. Skips (doesn't fail) when GITEA_TOKEN is unset.
.PHONY: _publish-dmg
_publish-dmg:
@if [ -z "$(GITEA_TOKEN)" ]; then echo "GITEA_TOKEN unset — skipping Gitea Packages publish"; exit 0; fi; \
VER=$$(node -p "require('./$(APP_DIR)/src-tauri/tauri.conf.json').version"); \
DMG=$$(ls -t $(DMG_DIR)/*.dmg 2>/dev/null | head -1); \
if [ -z "$$DMG" ]; then echo "no .dmg in $(DMG_DIR) — run make dmg first"; exit 1; fi; \
URL="$(GITEA_URL)/api/packages/$(GITEA_OWNER)/generic/$(GITEA_PKG)/$$VER/spacesh-$$VER.dmg"; \
echo "Publishing $$DMG → $$URL"; \
curl --fail-with-body -sS -H "Authorization: token $(GITEA_TOKEN)" --upload-file "$$DMG" "$$URL" && \
echo "Published spacesh-$$VER.dmg to Gitea Packages ($(GITEA_OWNER)/$(GITEA_PKG)@$$VER)"
.PHONY: deploy-stack
deploy-stack: ## sync compose+proxy.conf to prod and pull/up (manual; CI does this on push)
+1 -1
View File
@@ -3440,7 +3440,7 @@ dependencies = [
[[package]]
name = "spacesh-proto"
version = "0.1.3"
version = "0.1.6"
dependencies = [
"bytes",
"serde",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "spacesh",
"version": "0.1.3",
"version": "0.1.6",
"identifier": "xyz.spacesh.app",
"build": {
"frontendDist": "../dist",
+12
View File
@@ -25,6 +25,18 @@ mkdir -p $SSH_REMOTE_DIR/download
server, then `docker compose pull && up -d`.
- **DMG** → built on macOS, uploaded by hand: `make deploy-dmg`
(sets the stable `download/spacesh.dmg`). Tauri can't build a macOS bundle in CI.
The same command also publishes a **versioned** copy to the Gitea package
registry (`Packages` tab) when `GITEA_TOKEN` is set:
```bash
GITEA_TOKEN=<token-with-package:write> make deploy-dmg # server + Gitea Packages
make publish-dmg GITEA_TOKEN=<token> # build + Gitea Packages only
```
Published at `{GITEA_URL}/api/packages/{GITEA_OWNER}/generic/spacesh/<version>/spacesh-<version>.dmg`
(override `GITEA_URL`/`GITEA_OWNER`/`GITEA_PKG` if needed). Version comes from
`tauri.conf.json`, bumped on every `make dmg`. Without `GITEA_TOKEN` the publish
step is skipped (server copy still happens).
## Gitea secrets required