mirror of
https://github.com/qf3l3k/obsidian-data-fetcher.git
synced 2026-07-22 05:43:10 +00:00
chore: remove local release helper scripts from repo
This commit is contained in:
parent
6e88b220ee
commit
2f9dad1706
2 changed files with 0 additions and 107 deletions
|
|
@ -1,52 +0,0 @@
|
|||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Version
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Require-CleanTree {
|
||||
$status = git status --porcelain
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Failed to read git status."
|
||||
}
|
||||
$dirty = $status | Where-Object { $_ -notmatch '^\?\?\s+DEV_NOTES\.md$' }
|
||||
if ($dirty) {
|
||||
throw "Working tree is not clean. Commit/stash changes before running release script."
|
||||
}
|
||||
}
|
||||
|
||||
function Require-Ref([string]$RefName) {
|
||||
git rev-parse --verify $RefName *> $null
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Missing required ref: $RefName"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "==> Releasing version $Version"
|
||||
Require-CleanTree
|
||||
|
||||
Write-Host "==> Internal release on origin/main"
|
||||
git checkout main
|
||||
git pull origin main
|
||||
cmd /c npx tsc -noEmit -skipLibCheck
|
||||
cmd /c npm run build
|
||||
git add manifest.json versions.json package.json package-lock.json CHANGELOG.md README.md
|
||||
git commit -m "release: $Version"
|
||||
git tag $Version
|
||||
git push origin main --tags
|
||||
|
||||
Write-Host "==> Preparing PR branch from public/main"
|
||||
git fetch public --tags
|
||||
Require-Ref "public/main"
|
||||
Require-Ref $Version
|
||||
|
||||
$branch = "public-fix-$Version"
|
||||
git checkout -B $branch public/main
|
||||
git checkout $Version -- manifest.json versions.json package.json package-lock.json
|
||||
git add manifest.json versions.json package.json package-lock.json
|
||||
git commit -m "public: bump release metadata to $Version"
|
||||
git push public $branch
|
||||
|
||||
Write-Host "==> Open PR:"
|
||||
Write-Host "https://github.com/qf3l3k/obsidian-data-fetcher/pull/new/$branch"
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 <version>" >&2
|
||||
echo "Example: $0 1.0.7" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
V="$1"
|
||||
|
||||
require_clean_tree() {
|
||||
local dirty
|
||||
dirty="$(git status --porcelain | grep -vE '^\?\? DEV_NOTES\.md$' || true)"
|
||||
if [[ -n "$dirty" ]]; then
|
||||
echo "Working tree is not clean. Commit/stash changes before running release script." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
require_ref() {
|
||||
local ref="$1"
|
||||
if ! git rev-parse --verify "$ref" >/dev/null 2>&1; then
|
||||
echo "Missing required ref: $ref" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "==> Releasing version $V"
|
||||
require_clean_tree
|
||||
|
||||
echo "==> Internal release on origin/main"
|
||||
git checkout main
|
||||
git pull origin main
|
||||
npx tsc -noEmit -skipLibCheck
|
||||
npm run build
|
||||
git add manifest.json versions.json package.json package-lock.json CHANGELOG.md README.md
|
||||
git commit -m "release: $V"
|
||||
git tag "$V"
|
||||
git push origin main --tags
|
||||
|
||||
echo "==> Preparing PR branch from public/main"
|
||||
git fetch public --tags
|
||||
require_ref "public/main"
|
||||
require_ref "$V"
|
||||
|
||||
BRANCH="public-fix-$V"
|
||||
git checkout -B "$BRANCH" public/main
|
||||
git checkout "$V" -- manifest.json versions.json package.json package-lock.json
|
||||
git add manifest.json versions.json package.json package-lock.json
|
||||
git commit -m "public: bump release metadata to $V"
|
||||
git push public "$BRANCH"
|
||||
|
||||
echo "==> Open PR:"
|
||||
echo "https://github.com/qf3l3k/obsidian-data-fetcher/pull/new/$BRANCH"
|
||||
Loading…
Reference in a new issue