Skip to content

publish binary - #15

Merged
khaliqgant merged 1 commit into
mainfrom
binary-install
Feb 2, 2026
Merged

publish binary#15
khaliqgant merged 1 commit into
mainfrom
binary-install

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Feb 2, 2026

Copy link
Copy Markdown
Member

@khaliqgant
khaliqgant merged commit d5543f9 into main Feb 2, 2026
1 check passed
@khaliqgant
khaliqgant deleted the binary-install branch February 2, 2026 12:13

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

--compile \
--minify \
--target=${{ matrix.target }} \
--define="process.env.DASHBOARD_SERVER_VERSION=\"${{ needs.build.outputs.new_version }}\"" \

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.

🟡 Compiled binary will always report 'unknown' version due to unused --define flag

The workflow passes --define="process.env.DASHBOARD_SERVER_VERSION=\"${{ needs.build.outputs.new_version }}\"" to bun build --compile, but the getVersion() function in start.ts never checks this environment variable.

Click to expand

Root Cause

The getVersion() function at packages/dashboard-server/src/start.ts:18-38 only reads version from package.json files on disk:

function getVersion(): string {
  // Walk up to find package.json
  let dir = __dirname;
  for (let i = 0; i < 5; i++) {
    const pkgPath = join(dir, 'package.json');
    if (existsSync(pkgPath)) {
      // ... reads from package.json
    }
  }
  return 'unknown';
}

When the binary is compiled with bun build --compile, the package.json file is not bundled with the binary. The workflow at line 241 attempts to inject the version via --define, but this value is never used.

Actual vs Expected

Actual: Running ./relay-dashboard-server --version will output unknown

Expected: Running ./relay-dashboard-server --version should output the actual version (e.g., 2.0.50)

Impact

Users downloading the standalone binary won't be able to verify which version they have installed, making it difficult to troubleshoot issues or verify they have the latest version.

Recommendation: Modify getVersion() in packages/dashboard-server/src/start.ts to check process.env.DASHBOARD_SERVER_VERSION first before falling back to reading from package.json:

function getVersion(): string {
  // Check for compile-time injected version first (for standalone binaries)
  if (process.env.DASHBOARD_SERVER_VERSION) {
    return process.env.DASHBOARD_SERVER_VERSION;
  }
  // Fall back to reading from package.json...
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant