mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	 a9a4b0b9ff
			
		
	
	a9a4b0b9ff
	
	
	
		
			
			* adding new version bump refactoring * address comments * remove changes used for testing * add the version bump event! * fix local enos scenarios * remove unnecessary local get_local_metadata steps from scenarios * add version base, pre, and meta to the get_local_metadata module * use the get_local_metadata module in the local builder for version metadata * update the version verifier to always require a build date Signed-off-by: Ryan Cragun <me@ryan.ec> * Update to embed the base version from the VERSION file directly into version.go. This ensures that any go tests can use the same (valid) version as CI and so can local builds and local enos runs. We still want to be able to set a default metadata value in version_base.go as this is not something that we set in the VERSION file - we pass this in as an ldflag in CI (matters more for ENT but we want to keep these files in sync across repos). * update comment * fixing bad merge * removing actions-go-build as it won't work with the latest go caching changes * fix logic for getting version in enos-lint.yml * fix version number * removing unneeded module --------- Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Claire <claire@hashicorp.com> Co-authored-by: Ryan Cragun <me@ryan.ec>
		
			
				
	
	
		
			29 lines
		
	
	
		
			773 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			773 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright (c) HashiCorp, Inc.
 | |
| // SPDX-License-Identifier: BUSL-1.1
 | |
| 
 | |
| package version
 | |
| 
 | |
| import (
 | |
| 	_ "embed"
 | |
| 	"strings"
 | |
| )
 | |
| 
 | |
| var (
 | |
| 	// The git commit that was compiled. This will be filled in by the compiler.
 | |
| 	GitCommit   string
 | |
| 	GitDescribe string
 | |
| 
 | |
| 	// The compilation date. This will be filled in by the compiler.
 | |
| 	BuildDate string
 | |
| 
 | |
| 	// Whether cgo is enabled or not; set at build time
 | |
| 	CgoEnabled bool
 | |
| 
 | |
| 	// Version and VersionPrerelease info are now being embedded directly from the VERSION file.
 | |
| 	// VersionMetadata is being passed in via ldflags in CI, otherwise the default set here is used.
 | |
| 	//go:embed VERSION
 | |
| 	fullVersion                   string
 | |
| 	Version, VersionPrerelease, _ = strings.Cut(strings.TrimSpace(fullVersion), "-")
 | |
| 	VersionMetadata               = ""
 | |
| )
 |