Open wkillerud opened 2 months ago
A commonly used workaround that achieves the same result, since eik publish
exits 0:
eik version || true && eik publish
Documented in the context of GitHub Actions here, including committing eik.json
if there are changes:
https://github.com/eik-lib/eik-lib.github.io/pull/115
At the time of writing the
eik version
command does a comparison of the files currently up on Eik and the ones that are on the local or CI machine, that are about to be (maybe) published.eik version
exits with an error code if there are no new or changed files locally. https://github.com/eik-lib/cli/blob/37a6139f70f1ff05f71af7d381261d4658e643bc/classes/version.js#L158-L162eik publish
, however, exits with code 0 if the user tries to publish to a version that already exists. https://github.com/eik-lib/cli/blob/37a6139f70f1ff05f71af7d381261d4658e643bc/utils/error.js#L27-L29The exit code for
eik version
makes it a bit tricky to write automated release workflows using the CLI. In a lot of our projects we do want to continue the CI workflow to deploy the server-side of things, even if the client-side hasn't changed.I see the use for some kind of signal that "hey, nothing changed, you don't have to continue", so I don't want to change the default behaviour of
eik version
.However, some kind of flag that changes the exit code to 0 would be useful. There are workarounds of course, but some kind of designed solution would be nice.