Skip to content

CVar for code source info - #6749

Merged
metalgearsloth merged 6 commits into
space-wizards:masterfrom
Fildrance:feature/inject-build-info-into-cvar-on-publish
Oct 26, 2026
Merged

metalgearsloth merged 6 commits into
space-wizards:masterfrom
Fildrance:feature/inject-build-info-into-cvar-on-publish

Conversation

@Fildrance

@Fildrance Fildrance commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Bug report feature would need full info on sources that were used to run current instance of application, at least server side.

Added CVar for engine and content source version data (commit SHA, url of repo, branch used) so it can be passed to bug report stuff or displayed in UI.
Data should be filled by RobustCDN, implanted on publish (already done - space-wizards/Robust.Cdn#11 merged and service updated for wizden), real values should be provided by publish script (will be separate PR, very soon).

@Fildrance
Fildrance requested a review from DrSmugleaf as a code owner July 7, 2026 10:46
@Fildrance

Fildrance commented Jul 7, 2026 •

Copy link
Copy Markdown
Member Author

After merge we will just going to need to add

      - name: Inject build info
        run: RobustToolbox/Tools/inject_build_info.py
        env:
          GITHUB_SERVER_URL: ${{ github.server_url }}
          GITHUB_REPOSITORY: ${{ github.repository }}
          GITHUB_SHA: ${{ github.sha }}
          GITHUB_REF_NAME: ${{ github.ref_name }}

after Build Packaging and before Package server steps
into

  • publish-testing.yml
  • publish.yml
  • test-packaging.yml

And ideally add display of this data somewhere in client UI :>

@Simyon264

Copy link
Copy Markdown
Member

This should be handled by RobustCDN. build.json is also currently made by RobustCDN.
https://github.com/space-wizards/Robust.Cdn/blob/0b2b814e4f16b0474f341bb0f041bd7ae9f5b34d/Robust.Cdn/Controllers/ForkPublishController.cs#L114

@Fildrance

Copy link
Copy Markdown
Member Author

@Simyon264 okay i found related code in CDN and changed it, changed RT code to only get more variables from build.json

Can you point me to GHA that is posting to RobustCDN so i can add new arguments there?

@Simyon264

Copy link
Copy Markdown
Member

It's publish.yml and publish-testing.yml iirc.

@Fildrance Fildrance changed the title feat: script for injecting build info into toml CVar for code source info Jul 12, 2026
Comment thread Robust.Shared/CVars.cs
/// or original game repository.
/// </summary>
public static readonly CVarDef<string> SourceUrl =
CVarDef.Create("build.source_url", string.Empty);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MyFork is an actual repo so probably better to use space-wizards

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually hilarious ;3 yeah i am not a fan of promoting MyFork, lets stay with space-wizards as safe defaults here ;D

@metalgearsloth
metalgearsloth added this pull request to the merge queue Oct 26, 2026
@metalgearsloth
metalgearsloth removed this pull request from the merge queue due to a manual request Oct 26, 2026
@metalgearsloth
metalgearsloth merged commit 26d8815 into space-wizards:master Oct 26, 2026
17 checks passed
@Fildrance
Fildrance deleted the feature/inject-build-info-into-cvar-on-publish branch October 26, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants