Skip to main content
This package has been archived, and as such it is read-only.
This release is 1 version behind 0.0.9 — the latest version of @apompolo/mr-cli. Jump to latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
58%
Published
4 weeks ago (0.0.8)
Package root>main.ts
import { Input } from "jsr:@cliffy/prompt@1.0.0-rc.7"; import { canParse } from "jsr:@std/semver@^1.0.3"; import { getAppInfo } from "./getAppInfo.ts"; import { setNewVersion } from "./setNewVersion.ts"; import { Terminal } from "./terminal.ts"; if (import.meta.main) { const projectDirPath = Deno.cwd(); await Terminal.withSpinner("Warming up", async () => { await Promise.all([ Terminal.checkIfInstalled("eas"), Terminal.checkIfInstalled("git"), ]); }); const appInfo = await getAppInfo(projectDirPath); const nextVersion = await Input.prompt({ message: `What's the next version for ${appInfo.name}? Current is ${appInfo.version}`, validate(value) { return canParse(value) ? true : `Version should be in SemVer format. (i.e. ${appInfo.version})`; }, }); await Terminal.withSpinner("Updating files...", async () => { await setNewVersion({ projectDir: appInfo.projectDir, newVersion: nextVersion, newBuildNumber: appInfo.buildNumber + 1, }); }); await Terminal.withSpinner("Syncing up with GitHub...", async () => { const currentBranch = ( await Terminal.run("git branch --show-current") ).trim(); await Terminal.run("git add ."); await Terminal.run(`git commit -m v${nextVersion}`); await Terminal.run(`git tag ${nextVersion}`); await Terminal.run(`git push origin ${nextVersion}`); await Terminal.run(`git push origin ${currentBranch}`); }); await Terminal.withSpinner("Triggering EAS builds", async () => { await Terminal.run( "eas build --platform all --profile production --auto-submit --non-interactive --no-wait" ); }); console.log( "🎉 Done! If you want to check the builds that are running in EAS, run 'eas build:list --status in-progress'" ); }