mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-10 14:18:47 -07:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 272866beb3 | |||
| 2bc01424cd | |||
| f85b8f5813 | |||
| aa0ae083e8 | |||
| 4aedd6d808 | |||
| 1a4e5314b2 | |||
| 642721e85e | |||
| a67cdebac4 | |||
| fbbbbbaaae | |||
| 5eb956aa2a | |||
| d797c0c934 | |||
| a9355f03c0 | |||
| e3e28b5170 | |||
| 25fdc6f817 | |||
| f8c54afa18 | |||
| adb5055f7b | |||
| 0e17e64e51 | |||
| 870d5aef49 | |||
| 015f7f5baa | |||
| 04ceaff5ed | |||
| 4b77efdaae | |||
| a05158aedf | |||
| 01833619be | |||
| 15d6f3bbda | |||
| 037003134d | |||
| 142a2987cb | |||
| 034ce42de0 | |||
| f78c77be21 | |||
| 65218f7f93 | |||
| 657177bda1 | |||
| cee28b09b8 | |||
| 8ac000c213 | |||
| f17908803d | |||
| b17f3565c9 | |||
| 2a82a81a27 | |||
| dac83cdcf6 | |||
| 14665d771f | |||
| 71858aec47 | |||
| 539354c4b2 | |||
| 552bc1b8dd | |||
| e8dce3b972 | |||
| 8d5dd9bdc1 | |||
| 71b7210525 | |||
| 19d4e48cb2 | |||
| daa866862b |
@@ -8,11 +8,11 @@
|
||||
</p>
|
||||
|
||||
<h3>
|
||||
<a href="https://www.visioncortex.org/vtracer-docs">Article</a>
|
||||
<a href="https://github.com/visioncortex/vtracer/releases">Releases</a>
|
||||
<span> | </span>
|
||||
<a href="https://www.visioncortex.org/vtracer/">Web App</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/visioncortex/vtracer/releases">Download</a>
|
||||
<a href="https://github.com/visioncortex/vtracer/releases/download/1.0.0-alpha.3/VTracer_1.0.0-alpha.3_x64-setup.exe">Windows App</a>
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
@@ -46,7 +46,7 @@ VTracer is originally designed for processing high resolution scans of historic
|
||||
|
||||
Technical descriptions of the [tracing algorithm](https://www.visioncortex.org/vtracer-docs) and [clustering algorithm](https://www.visioncortex.org/impression-docs).
|
||||
|
||||
## Desktop App (coming soon)
|
||||
## Desktop App
|
||||
|
||||

|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "1.0.0-alpha.4.app.151",
|
||||
"notes": "VTracer 1.0.0-alpha.4 - Build 151 (b8bcabc6)",
|
||||
"pub_date": "2026-09-09T21:32:04.887Z",
|
||||
"platforms": {
|
||||
"macos-universal": {
|
||||
"url": "https://github.com/visioncortex/vtracer/releases/download/1.0.0-alpha.4/VTracer_1.0.0-alpha.4_universal.app.tar.gz",
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSUENOK1VhM1NxTVlYOC9hZGs3V3lpeWxpYnVBOEVNbFZXVWZ1YSthY3pBdXJZdG80MHJMYWZxL24xaVNhc2lRQnlPK3FDN09mbUxrVURsa2FCTGZIZFpuNmw3SlY3emc0PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzg4OTg3MDc3CWZpbGU6VlRyYWNlci5hcHAudGFyLmd6CjIyL250TEk3VnlVUmVmWktkT0laU1E1bzNhQ0dJSVkwNWtNOFNNRUU1VmRMY3pPN252cGRiWHJUSGJwRHoyN2lZM01MS0JhcjFwZ2FQdFJESGllWkF3PT0K"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"url": "https://github.com/visioncortex/vtracer/releases/download/1.0.0-alpha.4/VTracer_1.0.0-alpha.4_x64-setup.exe",
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSUENOK1VhM1NxTWQ2WGpRRE9VTjdxcE9uaGhPSHBUUWVtYi82Si9JeHN2ZDN1TkUxRnY3V0ZPL3VIeGJsM1dSV2ZFRDlOZmhSMWh2WEdRZ3JiOXdXNnRLNHFtT1Y5d3dnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzg4OTg3MjUxCWZpbGU6VlRyYWNlcl8xLjAuMC1hbHBoYS40LmFwcC4xNTFfeDY0LXNldHVwLmV4ZQpMR0pvNkVGWm42YTlzMU1nSVlYeDlCV0NZb1hHR0dIOTdMRTdkSXpxTTFlcmlZWGVkcVZzdmhmTDBsQTBUUHBCL3ptdk82OExPV0NwYUMwY1RQc21Cdz09Cg=="
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"url": "https://github.com/visioncortex/vtracer/releases/download/1.0.0-alpha.4/VTracer_1.0.0-alpha.4_x64.AppImage",
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSUENOK1VhM1NxTVVhRjErZk5oVWQvdWRmMndzalNVYWNBQzN0emRVM1kvMWw5KzZjcUFCS0s2TFI4Ymc1Ynl2cWtNcmJDMFBvbU9IT0VYekQzc3VsQUlLdWdHMWFzK2dNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzg4MDIyMjUzCWZpbGU6VlRyYWNlcl8xLjAuMC1hbHBoYS40LmFwcC4xMTFfYW1kNjQuQXBwSW1hZ2UKT0RzUkx4azJqTmJvN3AvVFlIQUZZakVHTVFUalVWU2prajhvakp6eHRzTHVNZU5OVUV3WEZCWDd3QkY4YStqSDFqb0Qyam5XU1ZrdWVzK2JjUTI1RGc9PQo="
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+124
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Publish the current version of vtracer to every surface. Idempotent: each
|
||||
# step is skipped if it is already done, so it is safe to re-run after a
|
||||
# partial or interrupted release.
|
||||
#
|
||||
# Surfaces:
|
||||
# - git push master, push tag (the tag push triggers the PyPI wheels)
|
||||
# - crates.io vtracer, then vtracer-cli; and vtracer-bench (independent)
|
||||
# - npm @visioncortex/vtracer
|
||||
# - GitHub a release from the tag, marked latest (triggers the binaries)
|
||||
#
|
||||
# Prerequisites (all in your own shell — this cannot run in a sandbox):
|
||||
# cargo login • npm login • gh auth login
|
||||
# version already bumped + committed on master.
|
||||
#
|
||||
# Usage: ./scripts/publish.sh # confirm, then publish what's missing
|
||||
# ./scripts/publish.sh --dry # checks + build/test only, no publish
|
||||
#
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
DRY=0
|
||||
[ "${1:-}" = "--dry" ] && DRY=1
|
||||
|
||||
VERSION=$(grep -m1 '^version = ' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
TAG="$VERSION"
|
||||
|
||||
say() { printf '\n\033[1;36m==> %s\033[0m\n' "$*"; }
|
||||
skip() { printf ' \033[2m· %s\033[0m\n' "$*"; }
|
||||
|
||||
# --- availability probes (used to skip already-done steps) -------------------
|
||||
crate_published() { # crate, version
|
||||
# crates.io rejects requests without a User-Agent (403), and `curl -f` hides
|
||||
# that as an empty body — so the UA is mandatory or this never matches.
|
||||
curl -fsS -H "User-Agent: vtracer-publish (github.com/visioncortex/vtracer)" \
|
||||
"https://crates.io/api/v1/crates/$1/$2" 2>/dev/null | grep -q "\"num\":\"$2\""
|
||||
}
|
||||
npm_published() { # pkg@version
|
||||
npm view "$1" version >/dev/null 2>&1
|
||||
}
|
||||
gh_release_exists() { gh release view "$1" >/dev/null 2>&1; }
|
||||
|
||||
say "Publishing vtracer $VERSION (dry-run: $DRY)"
|
||||
|
||||
# --- preconditions -----------------------------------------------------------
|
||||
say "Checking preconditions"
|
||||
[ "$(git rev-parse --abbrev-ref HEAD)" = master ] || { echo "!! not on master"; exit 1; }
|
||||
[ -z "$(git status --porcelain --untracked-files=no)" ] || { echo "!! tracked files have uncommitted changes — commit first"; exit 1; }
|
||||
for tool in cargo npm gh curl; do command -v "$tool" >/dev/null || { echo "!! missing: $tool"; exit 1; }; done
|
||||
# The version we publish comes from Cargo.toml at HEAD; the tag only marks the
|
||||
# release commit for CI, so it need not be at HEAD (a later commit such as this
|
||||
# script is fine). Guard only against the genuinely wrong case: a tag whose own
|
||||
# commit carries a different version than the one we're about to publish.
|
||||
if git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then
|
||||
tag_ver=$(git show "$TAG:Cargo.toml" 2>/dev/null | grep -m1 '^version = ' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
[ "$tag_ver" = "$VERSION" ] || { echo "!! tag $TAG marks version $tag_ver, but HEAD is $VERSION"; exit 1; }
|
||||
skip "tag $TAG already exists (marks $VERSION)"
|
||||
fi
|
||||
|
||||
# --- build + test (always, even on --dry) ------------------------------------
|
||||
say "Building + testing"
|
||||
cargo test --workspace
|
||||
cargo build --release -p vtracer-cli
|
||||
( cd nodejs && npm run build )
|
||||
|
||||
if [ "$DRY" = 1 ]; then say "Dry run complete — checks passed, nothing published."; exit 0; fi
|
||||
|
||||
# --- confirm -----------------------------------------------------------------
|
||||
printf '\nPublish vtracer %s (git, crates.io, npm, GitHub)? Steps already done are skipped. [y/N] ' "$VERSION"
|
||||
read -r reply
|
||||
[ "$reply" = y ] || [ "$reply" = Y ] || { echo "aborted."; exit 1; }
|
||||
|
||||
# --- 1. git: push master, then the tag (tag push triggers the PyPI wheels) ---
|
||||
say "git: push master + tag"
|
||||
git push origin master
|
||||
git rev-parse "refs/tags/$TAG" >/dev/null 2>&1 || git tag "$TAG"
|
||||
git push origin "$TAG"
|
||||
|
||||
# --- 2. crates.io: core first, then the CLI that depends on it ---------------
|
||||
if crate_published vtracer "$VERSION"; then
|
||||
skip "crates.io vtracer $VERSION already published"
|
||||
else
|
||||
say "crates.io: publishing vtracer"
|
||||
cargo publish -p vtracer
|
||||
printf ' waiting for the index'
|
||||
until crate_published vtracer "$VERSION"; do printf '.'; sleep 10; done; echo
|
||||
fi
|
||||
if crate_published vtracer-cli "$VERSION"; then
|
||||
skip "crates.io vtracer-cli $VERSION already published"
|
||||
else
|
||||
say "crates.io: publishing vtracer-cli"
|
||||
cargo publish -p vtracer-cli
|
||||
fi
|
||||
# vtracer-bench depends only on registry crates (not vtracer), so order is free.
|
||||
if crate_published vtracer-bench "$VERSION"; then
|
||||
skip "crates.io vtracer-bench $VERSION already published"
|
||||
else
|
||||
say "crates.io: publishing vtracer-bench"
|
||||
cargo publish -p vtracer-bench
|
||||
fi
|
||||
|
||||
# --- 3. npm ------------------------------------------------------------------
|
||||
# Published to the default `latest` tag, matching the earlier alpha releases.
|
||||
# For a prerelease you may prefer: ( cd nodejs && npm publish --tag next )
|
||||
if npm_published "@visioncortex/vtracer@$VERSION"; then
|
||||
skip "npm @visioncortex/vtracer@$VERSION already published"
|
||||
else
|
||||
say "npm: publishing @visioncortex/vtracer"
|
||||
( cd nodejs && npm publish )
|
||||
fi
|
||||
|
||||
# --- 4. GitHub release (its creation triggers the binary build workflow) -----
|
||||
if gh_release_exists "$TAG"; then
|
||||
skip "GitHub release $TAG already exists"
|
||||
else
|
||||
say "GitHub: creating release $TAG"
|
||||
NOTES=$(awk -v h="## $VERSION" 'index($0,h)==1{f=1;next} /^## /&&f{exit} f' CHANGELOG.md)
|
||||
# --latest: mark as the latest release (gh would otherwise treat an -alpha
|
||||
# tag as a prerelease and not promote it).
|
||||
gh release create "$TAG" --latest --title "$TAG" --notes "${NOTES:-Release $VERSION}"
|
||||
fi
|
||||
|
||||
say "Done. crates.io + npm up to date; PyPI wheels build from the tag; binaries build from the release."
|
||||
Reference in New Issue
Block a user