Skip to content

Instantly share code, notes, and snippets.

@ArtDepartmentMJ
ArtDepartmentMJ / gist:3c6e324b461c9c91a1f8b076567afc4f
Last active April 30, 2026 09:45
zsh/bash release function
release() {
local root script url local_version remote_version
root="$(git rev-parse --show-toplevel 2>/dev/null)"
if [[ -z "$root" ]]; then
echo "Not inside a git repository."
return 1
fi
script="$root/scripts/release.mjs"
url="https://gist.githubusercontent.com/ArtDepartmentMJ/04da069c9df36a6db8e81a203f8460c5/raw/gistfile1.txt"
if [[ ! -f "$script" ]]; then
const VERSION = '1.0.3';
import { execSync } from 'child_process';
import { readFileSync } from 'fs';
import { resolve } from 'path';
import * as readline from 'readline/promises';
import { stdin as input, stdout as output } from 'process';
// Load .env from repo root
try {