feat: skip the build phase when build-command is none - #9
Merged
Conversation
Repos with no build script run their source directly; the always-on build phase failed them with 'Script not found "build"'. The exact input value "none" now skips the build in both deploy and destroy modes. An empty value still falls back to the default, so a blank or mistyped command can never silently skip a build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Prisma Console's setup generator supports repos with no
buildscript — a stockbun create elysiaapp runs its TypeScript source directly. The action's build phase always runsbuild-command(defaultnpm run build), so those repos fail onerror: Script not found "build". Once this ships, the generator will emitbuild-command: nonefor such repos.What
noneskips the build phase, in bothdeployanddestroymodes. The run logsbuild: skipped (build-command: none)and continues to install → deploy as before.noneskips. An empty value still falls back to the defaultnpm run build, and any other value runs verbatim — a blank or mistyped command can never silently skip a build.build.mjs(selectBuildCommand), following the repo's pattern of small tested modules (composer.mjs,deployment.mjs);main.mjsexecutes on import, so the logic had to move to be unit-testable.action.ymland the README document the value (inputs table row plus one sentence in the phases paragraph).Build-report phases stay consistent
A skipped build sends no report update of its own, and the report never gets stuck in the build phase:
mapPhasesends the install phase as the server-sidebuildphase, so the report is already inbuildbefore the build command would run — the build phase's own update in a normal run re-sends that same value. The deploy phase then advances the report todeployexactly as before. The server-visible phase sequence (build→deploy→ terminal state) is identical with and without the skip.Tests
node --test tests/*.test.mjs: 43 pass, 0 fail (5 new intests/build.test.mjs:noneskips, empty falls back to the default, other commands run verbatim,Noneand commands containing "none" do not skip).node --checkonmain.mjs,post.mjs,credentials.mjs, plus the newbuild.mjs) and theaction.ymlsanity check pass.main.mjswith a stubbunand a dummy service token: deploy+noneand destroy+nonelog the skip line and continue to the Composer step; a realbuild-commandstill runs in its::group::buildblock; outcomesucceededin all three runs.🤖 Generated with Claude Code