Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.0] - 2026-03-15

### Added
- `--version` / `-v` flag to print the embedded version and exit
- Version is now embedded in the binary at compile time via `//go:embed VERSION`

## [0.6.0] - 2026-03-10

### Added
Expand Down Expand Up @@ -88,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[0.7.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/gooddata/gooddata-goodmock/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.4.0...v0.5.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.7.0
12 changes: 12 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package main

import (
_ "embed"
"encoding/json"
"fmt"
"goodmock/internal/common"
Expand All @@ -16,7 +17,18 @@ import (
"github.com/valyala/fasthttp"
)

//go:embed VERSION
var version string

func main() {
for _, arg := range os.Args[1:] {
if arg == "-v" || arg == "--version" {
fmt.Print(strings.TrimSpace(version))
fmt.Println()
os.Exit(0)
}
}

// First arg is the mode (default: replay)
mode := "replay"
if len(os.Args) > 1 {
Expand Down