feature: add railway version command with build metadata#853
Open
manwindersingh1712 wants to merge 2 commits into
Open
feature: add railway version command with build metadata#853manwindersingh1712 wants to merge 2 commits into
railway version command with build metadata#853manwindersingh1712 wants to merge 2 commits into
Conversation
Member
|
I'm a bit confused as to why we would add |
railway version command with build metadatarailway version command with build metadata
Author
@noahdunnagan My thinking here is that --version should stay simple and fast, it’s meant for scripts and piping. Changing it to do network calls or print multi-line output could break things like Version is meant to handle the richer, diagnostic use case (commit, build date, etc.), which is more useful for debugging and CI. This follows the pattern most CLIs use (Docker, kubectl, Terraform), so separating the two keeps things clean and reliable. |
Author
|
@noahdunnagan Something like this. |
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.

Description
Adds a new
railway versioncommand that displays detailed build information and update status.Features
--jsonflag for programmatic usageExample Output
Changes
src/commands/version.rs- new command implementationbuild.rs- exposeGIT_SHA,BUILD_DATE, andRUSTC_VERSIONsrc/commands/mod.rsandsrc/main.rsTesting
cargo build --releasesucceedsrailway versionshows correct outputrailway version --jsonoutputs valid JSON