From 1f4063d5db925411bd7639eedb9faa3de92a635d Mon Sep 17 00:00:00 2001 From: Razvan Dimescu Date: Tue, 24 Mar 2026 00:45:15 +0200 Subject: [PATCH] update crate metadata + add deploy.sh release script Co-Authored-By: Claude Opus 4.6 (1M context) --- Cargo.toml | 4 ++-- deploy.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100755 deploy.sh diff --git a/Cargo.toml b/Cargo.toml index 7d218de..fa52afa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,10 +3,10 @@ name = "numa" version = "0.5.0" authors = ["razvandimescu "] edition = "2021" -description = "Ephemeral DNS overrides for development and testing. Point any hostname to any endpoint. Auto-revert when you're done." +description = "Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS" license = "MIT" repository = "https://github.com/razvandimescu/numa" -keywords = ["dns", "proxy", "override", "development", "networking"] +keywords = ["dns", "dns-server", "ad-blocking", "reverse-proxy", "developer-tools"] categories = ["network-programming", "development-tools"] [dependencies] diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..7b5e6ba --- /dev/null +++ b/deploy.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +set -euo pipefail + +VERSION="${1:-}" + +if [ -z "$VERSION" ]; then + echo "Usage: ./deploy.sh v0.5.1" + exit 1 +fi + +# Strip leading 'v' for Cargo.toml (accepts both "v0.5.1" and "0.5.1") +SEMVER="${VERSION#v}" +TAG="v${SEMVER}" + +# Validate semver format +if ! [[ "$SEMVER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: '$SEMVER' is not a valid semver (expected: X.Y.Z)" + exit 1 +fi + +# Check we're on main +BRANCH=$(git branch --show-current) +if [ "$BRANCH" != "main" ]; then + echo "Error: must be on main branch (currently on '$BRANCH')" + exit 1 +fi + +# Check working tree is clean +if [ -n "$(git status --porcelain -- ':!deploy.sh' ':!Cargo.toml' ':!Cargo.lock')" ]; then + echo "Error: working tree has uncommitted changes" + git status --short + exit 1 +fi + +# Check tag doesn't already exist +if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Error: tag '$TAG' already exists" + exit 1 +fi + +CURRENT=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') +echo "Bumping $CURRENT → $SEMVER" + +# Update Cargo.toml version +sed -i '' "s/^version = \"$CURRENT\"/version = \"$SEMVER\"/" Cargo.toml + +# Update Cargo.lock +cargo check --quiet 2>/dev/null + +# Commit, tag, push +git add Cargo.toml Cargo.lock +git commit -m "bump version to $SEMVER" +git tag "$TAG" +git push +git push origin "$TAG" + +echo "" +echo "✓ Tagged $TAG and pushed" +echo " → GitHub Actions: release binaries + crates.io publish" +echo " → Watch: gh run list --limit 1"