Skip to content

Commit c1ee678

Browse files
committed
feat(winget): prepare xronocode.Mark winget-pkgs submission (C-15 T-105, Amendment #3)
User pulled winget ahead of the release so the tester has a clean install/upgrade path. tools/winget/sync-manifest.sh renders the three manifests (installer/defaultLocale/version, schema 1.9.0, NSIS per-user scope) from a live release — downloads the x64 installer, hashes it, sparse-clones winget-pkgs and opens the PR from the xronocode fork. Reference copies for v2.2.0-beta + README under tools/winget/. Winget serves published releases only: dry-run QA artifacts stay outside it; tester updates flow through the in-app updater after the first install. Submission runs right after the v2.2.0-beta release (Windows QA round 2 green → WINDOWS_RELEASE=true). C-15 spec Amendment #3 records the timing change; QA checklist updated with the post-release winget step.
1 parent ce32ace commit c1ee678

7 files changed

Lines changed: 209 additions & 0 deletions

File tree

‎.grace/changes/active/C-15/spec.xml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@
7070
single-instance plugin — a second "Open With" launch spawns a new
7171
process instead of forwarding.
7272
</Amendment>
73+
<Amendment date="2026-09-29">
74+
User: "если уже дело дошло до ретеста, то хорошо бы внедрить вингет,
75+
чтобы Нурику было проще обновляться" — winget PREPARATION moves
76+
ahead of the release (was decision (2): fast-follow after the first
77+
live release). tools/winget/sync-manifest.sh + reference manifests
78+
land now; the winget-pkgs PR is submitted immediately after the
79+
first live Windows release goes public (the installer URL must
80+
resolve — winget cannot serve dry-run QA artifacts). Tester update
81+
ergonomics in the QA window come from the in-app updater
82+
(/releases/latest/download/latest.json) after the first install.
83+
</Amendment>
7384
</Amendments>
7485

7586
<AcceptanceCriteria>

‎.grace/changes/active/C-15/windows-qa-checklist.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ spellcheck (hunspell-embedding F-SPELL-HUNSPELL-EMBED), print/screenshot/share,
2727
## После успешного QA
2828

2929
`gh variable set WINDOWS_RELEASE --body true -R xronocode/mark` → следующий тег публикует Windows-ассеты + `windows-x86_64` в latest.json (план: v2.2.0-beta, бамп 6 мест + preflight-fixture).
30+
31+
Сразу после публикации релиза — winget (C-15 T-105, Amendment #3):
32+
`tools/winget/sync-manifest.sh v2.2.0-beta` → PR в microsoft/winget-pkgs → после мержа `winget install xronocode.Mark`. Обновления тестеру: первая установка — exe с релиза, дальше in-app updater сам находит новые беты; winget — для чистых установок/`winget upgrade`.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Reference copy — sync-manifest.sh regenerates this with the real
2+
# sha256/release date at submit time (this file is NOT submitted verbatim).
3+
PackageIdentifier: xronocode.Mark
4+
PackageVersion: 2.2.0-beta
5+
InstallerType: nullsoft
6+
Installers:
7+
- Architecture: x64
8+
InstallerType: nullsoft
9+
Scope: user
10+
InstallerUrl: https://github.com/xronocode/mark/releases/download/v2.2.0-beta/Mark_2.2.0-beta_x64-setup.exe
11+
InstallerSha256: __PENDING_SHA256__
12+
InstallModes:
13+
- silent
14+
- silentWithProgress
15+
AppsAndFeaturesEntries:
16+
- DisplayName: Mark
17+
DisplayVersion: 2.2.0-beta
18+
Publisher: xronocode
19+
ReleaseDate: __RELEASE_DATE__
20+
ManifestType: installer
21+
ManifestVersion: 1.9.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
PackageIdentifier: xronocode.Mark
2+
PackageVersion: 2.2.0-beta
3+
PackageLocale: en-US
4+
Publisher: xronocode
5+
PublisherUrl: https://github.com/xronocode/mark
6+
PackageName: Mark
7+
Moniker: mark
8+
ShortDescription: Lightweight WYSIWYG markdown editor
9+
Description: Mark is a fast, lightweight WYSIWYG markdown editor — a ~10 MB native (Tauri) port of Mark Text for macOS and Windows with tabs, project tree, themes, pandoc export and a built-in updater.
10+
License: MIT
11+
LicenseUrl: https://github.com/xronocode/mark/blob/main/LICENSE
12+
Tags:
13+
- markdown
14+
- editor
15+
- wysiwyg
16+
- notes
17+
ReleaseNotesUrl: https://github.com/xronocode/mark/releases/tag/v2.2.0-beta
18+
ManifestType: defaultLocale
19+
ManifestVersion: 1.9.0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PackageIdentifier: xronocode.Mark
2+
PackageVersion: 2.2.0-beta
3+
DefaultLocale: en-US
4+
ManifestType: version
5+
ManifestVersion: 1.9.0

‎tools/winget/reference/README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# winget distribution (C-15 T-105)
2+
3+
`winget install xronocode.Mark` once the first manifest is merged into
4+
microsoft/winget-pkgs.
5+
6+
Flow (after the first live Windows release — the installer URL must resolve):
7+
8+
tools/winget/sync-manifest.sh v2.2.0-beta
9+
10+
The script downloads the release installer, hashes it, renders the three
11+
manifests (reference copies under `reference/`), sparse-clones
12+
winget-pkgs, pushes a branch to the xronocode fork and opens the PR.
13+
Re-run per release to publish `winget upgrade` versions.
14+
15+
Notes:
16+
- NSIS bundle uses Tauri's default per-user install → `Scope: user`,
17+
silent switch is NSIS-standard `/S` (matches the CI smoke install).
18+
- Winget only serves PUBLISHED releases — dry-run QA artifacts are not
19+
winget-installable; testers update via the in-app updater
20+
(`/releases/latest/download/latest.json`) after the first install.
21+
- Post-merge validation: `winget show xronocode.Mark` /
22+
`winget upgrade` on a Windows machine.

‎tools/winget/sync-manifest.sh‎

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#!/usr/bin/env bash
2+
# FILE: tools/winget/sync-manifest.sh
3+
# VERSION: 1.1.0
4+
# START_MODULE_CONTRACT
5+
# PURPOSE: Generate winget-pkgs manifests for a published Mark Windows release and open the submission PR.
6+
# SCOPE: download the x64 NSIS installer from a live GitHub release, hash it, render installer/locale/version YAML, sparse-clone microsoft/winget-pkgs, push a branch to the xronocode fork, open the PR.
7+
# DEPENDS: gh (authenticated), git, curl, shasum; network access to github.com.
8+
# LINKS: .grace/changes/active/C-15/plan.xml T-105; C-15 spec Amendment #3 (winget pulled ahead of the site card); M-046 release lane.
9+
# ROLE: SCRIPT
10+
# MAP_MODE: LOCALS
11+
# END_MODULE_CONTRACT
12+
#
13+
# START_MODULE_MAP
14+
# main - tag -> rendered manifests -> fork branch -> PR to microsoft/winget-pkgs
15+
# render_manifests - write the three YAML files from tag/sha/date into a staging dir
16+
# END_MODULE_MAP
17+
#
18+
# Usage: tools/winget/sync-manifest.sh v2.2.0-beta
19+
# Requires the release to be LIVE (the installer URL must resolve).
20+
21+
set -euo pipefail
22+
23+
TAG="${1:?usage: sync-manifest.sh <tag, e.g. v2.2.0-beta>}"
24+
VER="${TAG#v}"
25+
REPO="xronocode/mark"
26+
PKG_ID="xronocode.Mark"
27+
ASSET="Mark_${VER}_x64-setup.exe"
28+
URL="https://github.com/${REPO}/releases/download/${TAG}/${ASSET}"
29+
WORK="$(mktemp -d /tmp/winget-sync.XXXXXX)"
30+
STAGE="${WORK}/stage"
31+
MANIFEST_DIR="manifests/x/xronocode/Mark/${VER}"
32+
33+
echo "[winget-sync] ${PKG_ID} ${VER}"
34+
echo "[winget-sync] installer: ${URL}"
35+
36+
# START_BLOCK_FETCH_AND_HASH
37+
curl -fSL --retry 3 -o "${WORK}/${ASSET}" "${URL}"
38+
HASH="$(shasum -a 256 "${WORK}/${ASSET}" | awk '{print $1}')"
39+
RELEASE_DATE="$(gh release view "${TAG}" -R "${REPO}" --json publishedAt --jq '.publishedAt[0:10]')"
40+
echo "[winget-sync] sha256=${HASH} date=${RELEASE_DATE}"
41+
# END_BLOCK_FETCH_AND_HASH
42+
43+
# START_BLOCK_RENDER_MANIFESTS
44+
DEST="${STAGE}/${MANIFEST_DIR}"
45+
mkdir -p "${DEST}"
46+
47+
cat > "${DEST}/Mark.installer.yaml" <<YAML
48+
PackageIdentifier: ${PKG_ID}
49+
PackageVersion: ${VER}
50+
InstallerType: nullsoft
51+
Installers:
52+
- Architecture: x64
53+
InstallerType: nullsoft
54+
Scope: user
55+
InstallerUrl: ${URL}
56+
InstallerSha256: ${HASH}
57+
InstallModes:
58+
- silent
59+
- silentWithProgress
60+
AppsAndFeaturesEntries:
61+
- DisplayName: Mark
62+
DisplayVersion: ${VER}
63+
Publisher: xronocode
64+
ReleaseDate: ${RELEASE_DATE}
65+
ManifestType: installer
66+
ManifestVersion: 1.9.0
67+
YAML
68+
69+
cat > "${DEST}/Mark.locale.en-US.yaml" <<YAML
70+
PackageIdentifier: ${PKG_ID}
71+
PackageVersion: ${VER}
72+
PackageLocale: en-US
73+
Publisher: xronocode
74+
PublisherUrl: https://github.com/${REPO}
75+
PackageName: Mark
76+
Moniker: mark
77+
ShortDescription: Lightweight WYSIWYG markdown editor
78+
Description: Mark is a fast, lightweight WYSIWYG markdown editor — a ~10 MB native (Tauri) port of Mark Text for macOS and Windows with tabs, project tree, themes, pandoc export and a built-in updater.
79+
License: MIT
80+
LicenseUrl: https://github.com/${REPO}/blob/main/LICENSE
81+
Tags:
82+
- markdown
83+
- editor
84+
- wysiwyg
85+
- notes
86+
ReleaseNotesUrl: https://github.com/${REPO}/releases/tag/${TAG}
87+
ManifestType: defaultLocale
88+
ManifestVersion: 1.9.0
89+
YAML
90+
91+
cat > "${DEST}/Mark.yaml" <<YAML
92+
PackageIdentifier: ${PKG_ID}
93+
PackageVersion: ${VER}
94+
DefaultLocale: en-US
95+
ManifestType: version
96+
ManifestVersion: 1.9.0
97+
YAML
98+
# END_BLOCK_RENDER_MANIFESTS
99+
100+
# START_BLOCK_SUBMIT_PR
101+
# Blobless depth-1 clone + no-cone sparse on our publisher dir (new package:
102+
# the dir does not exist upstream yet — no-cone patterns allow that).
103+
cd "${WORK}"
104+
git clone --filter=blob:none --sparse --depth 1 https://github.com/microsoft/winget-pkgs.git
105+
cd winget-pkgs
106+
git sparse-checkout set --no-cone 'manifests/x/xronocode/*'
107+
BR="Mark-${VER}"
108+
git checkout -b "${BR}"
109+
mkdir -p "${MANIFEST_DIR}"
110+
cp "${STAGE}/${MANIFEST_DIR}"/*.yaml "${MANIFEST_DIR}/"
111+
git add "${MANIFEST_DIR}"
112+
git commit -m "Add ${PKG_ID} version ${VER}"
113+
gh repo fork microsoft/winget-pkgs --clone=false 2>/dev/null || true
114+
git remote add fork "https://github.com/xronocode/winget-pkgs.git" 2>/dev/null || true
115+
git push -u fork "${BR}"
116+
gh pr create -R microsoft/winget-pkgs \
117+
--head "xronocode:${BR}" \
118+
--title "Add ${PKG_ID} version ${VER}" \
119+
--body "New version of ${PKG_ID}.
120+
121+
- Installer: \`${ASSET}\` from https://github.com/${REPO}/releases/tag/${TAG}
122+
- sha256: \`${HASH}\`
123+
- NSIS per-user installer (\`/S\` silent), x64 only.
124+
- Homepage: https://mark.xronocode.com
125+
126+
Generated with tools/winget/sync-manifest.sh in the Mark repo."
127+
echo "[winget-sync] PR opened for ${VER}"
128+
# END_BLOCK_SUBMIT_PR

0 commit comments

Comments
 (0)