Skip to content

Use Go pseudo-version format for nightly builds#13

Open
chrismo wants to merge 1 commit intobrimdata:mainfrom
chrismo:pseudo-version-format
Open

Use Go pseudo-version format for nightly builds#13
chrismo wants to merge 1 commit intobrimdata:mainfrom
chrismo:pseudo-version-format

Conversation

@chrismo
Copy link
Copy Markdown

@chrismo chrismo commented Jan 9, 2026

Summary

  • Changes the nightly/prerelease version format from short commit hash (e.g., 06d757c) to Go pseudo-version format (e.g., v0.0.0-20260108170022-c35bda336273)
  • This aligns with the version string produced by go install github.com/brimdata/super/cmd/super@main

Changes

  • Updated ldflags to embed pseudo-version in binary
  • Updated archive name template to use version
  • Updated S3 URL template to use version
  • Updated snapshot version template to generate pseudo-version format

🤖 Generated with Claude Code

@chrismo chrismo marked this pull request as draft January 9, 2026 02:01
Changes version format from short commit hash (e.g., 06d757c)
to Go pseudo-version format (e.g., v0.0.0-20260108170022-c35bda336)

Uses nested replace functions to transform CommitDate from
RFC3339 (2026-01-08T17:00:22Z) to compact format (20260108170022).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chrismo chrismo force-pushed the pseudo-version-format branch from 4c681dc to a9bc3bc Compare January 9, 2026 02:04
@chrismo
Copy link
Copy Markdown
Author

chrismo commented Jan 9, 2026

Bash(goreleaser release --snapshot --clean --config /Users/chrismo/modev/homebrew-tap/.super-prerelease-cask-goreleaser.yaml 2>&1 && echo "" && echo "Binary version     timeout: 5m 
      check:" && ./dist/super_darwin_arm64_v8.0/super -version)                                                                                                            0s
  ⎿    • skipping announce, publish, and validate...                                                                                                                               
       • cleaning distribution directory
       • loading environment variables
       • getting and validating git state
         • git state                                      commit=c35bda3362735b1d18a8baa92bbd627e2e45a8db branch=homebrew-nightly-version current_tag=v1.18.0 previous_tag=v1.17.0
     dirty=true
         • pipe skipped or partially skipped              reason=disabled during snapshot mode
       • parsing tag
       • setting defaults
       • snapshotting
         • building snapshot...                           version=v0.0.0-20260109010022-c35bda336
       • ensuring distribution directory
       • setting up metadata
       • writing release metadata
       • loading go mod information
       • build prerequisites
       • building binaries
         • building                                       binary=dist/super_linux_arm64_v8.0/super
         • building                                       binary=dist/super_linux_amd64_v1/super
         • building                                       binary=dist/super_darwin_amd64_v1/super
         • building                                       binary=dist/super_darwin_arm64_v8.0/super
         • building                                       binary=dist/super_windows_amd64_v1/super.exe
         • building                                       binary=dist/super_windows_arm64_v8.0/super.exe
       • archives
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.windows-amd64.zip
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.linux-arm64.tar.gz
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.darwin-arm64.tar.gz
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.linux-amd64.tar.gz
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.darwin-amd64.tar.gz
         • archiving                                      name=dist/super-v0.0.0-20260109010022-c35bda336.windows-arm64.zip
       • calculating checksums
       • homebrew cask
         • writing                                        cask=dist/homebrew/Casks/super.rb
       • writing artifacts metadata
       • release succeeded after 12s
       • thanks for using GoReleaser!

     Binary version check:
     Version: v0.0.0-20260109010022-c35bda336

@chrismo chrismo marked this pull request as ready for review January 9, 2026 02:10
- CGO_ENABLED=0
ldflags:
- -s -X github.com/brimdata/super/cli.version={{ .ShortCommit }}
- '-s -X github.com/brimdata/super/cli.version=v0.0.0-{{ replace (replace (replace (replace .CommitDate "-" "") ":" "") "T" "") "Z" "" }}-{{ .ShortCommit }}'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@chrismo: Is there a way to use the pseudo-version number generated by the Go tools rather than constructing something similar like this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah i wondered that myself, but didn't dig in on it. I'll do some more research.

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.

2 participants