diff --git a/.changeset/bump-version.md b/.changeset/bump-version.md deleted file mode 100644 index 654ac7b0..00000000 --- a/.changeset/bump-version.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@prover-coder-ai/docker-git": patch -"@spawn-dock/cli": patch ---- - -chore: automated bump to trigger release using new NPM_KEY diff --git a/.changeset/config.json b/.changeset/config.json index 595f237e..ec9152c0 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -3,7 +3,7 @@ "changelog": [ "@changesets/changelog-github", { - "repo": "" + "repo": "SpawnDock/cli" } ], "commit": false, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 649de715..23d9b1ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: ProverCoderAI/action-release@v1.0.17 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: github_token: ${{ secrets.GITHUB_TOKEN }} npm_token: ${{ secrets.NPM_KEY }} @@ -36,6 +38,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: ProverCoderAI/action-release@v1.0.17 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: github_token: ${{ secrets.GITHUB_TOKEN }} npm_token: ${{ secrets.NPM_KEY }} diff --git a/packages/app/package.json b/packages/app/package.json index c1cf4246..fa4f1a5b 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -23,7 +23,7 @@ "lint:tests": "PATH=../../scripts:$PATH vibecode-linter tests/", "lint:effect": "PATH=../../scripts:$PATH eslint --config eslint.effect-ts-check.config.mjs .", "prebuild:docker-git": "pnpm -C ../lib build", - "build:docker-git": "vite build --config vite.docker-git.config.ts", + "build:docker-git": "vite build --config vite.docker-git.config.ts && cp -r ../../scripts dist/", "check": "pnpm run typecheck", "clone": "pnpm -C ../.. run clone", "open": "pnpm -C ../.. run open", diff --git a/packages/lib/src/shell/files.ts b/packages/lib/src/shell/files.ts index b4a30c9a..1696dd2b 100644 --- a/packages/lib/src/shell/files.ts +++ b/packages/lib/src/shell/files.ts @@ -10,6 +10,8 @@ import { type FileSpec, planFiles } from "../core/templates.js" import { FileExistsError } from "./errors.js" import { resolveBaseDir } from "./paths.js" +import { fileURLToPath } from "node:url" + const ensureParentDir = (path: Path.Path, fs: FileSystem.FileSystem, filePath: string) => fs.makeDirectory(path.dirname(filePath), { recursive: true }) @@ -116,11 +118,20 @@ const provisionDockerGitScripts = ( baseDir: string ): Effect.Effect => Effect.gen(function*(_) { - const workspaceRoot = process.cwd() - const sourceScriptsDir = path.join(workspaceRoot, "scripts") + const __dirname = path.dirname(fileURLToPath(import.meta.url)) + const packageScriptsDir = path.join(__dirname, "..", "..", "scripts") + const workspaceScriptsDir = path.join(process.cwd(), "scripts") + + let sourceScriptsDir = packageScriptsDir + let sourceExists = yield* _(fs.exists(sourceScriptsDir)) + + if (!sourceExists) { + sourceScriptsDir = workspaceScriptsDir + sourceExists = yield* _(fs.exists(sourceScriptsDir)) + } + const targetScriptsDir = path.join(baseDir, "scripts") - const sourceExists = yield* _(fs.exists(sourceScriptsDir)) if (!sourceExists) { return }