mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
4bcd98cda7
commit
a73641d2d7
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -68,7 +68,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
id: build
|
id: build
|
||||||
run: go build -o ${{ matrix.ARTIFACT }} -ldflags="-X 'main.version= ${{ needs.release.outputs.version }}'"
|
run: go build -o ${{ matrix.ARTIFACT }} -ldflags="-X 'main.Version=${{ needs.release.outputs.version }}'"
|
||||||
env:
|
env:
|
||||||
GOARCH: "amd64"
|
GOARCH: "amd64"
|
||||||
- name: Hash
|
- name: Hash
|
||||||
|
|
4
main.go
4
main.go
|
@ -7,7 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var currentVersion = "development"
|
var Version = "development"
|
||||||
|
|
||||||
type args struct {
|
type args struct {
|
||||||
ErrorCode *int
|
ErrorCode *int
|
||||||
|
@ -70,7 +70,7 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if *args.Version {
|
if *args.Version {
|
||||||
fmt.Println(currentVersion)
|
fmt.Println(Version)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
colorWriter := &Renderer{
|
colorWriter := &Renderer{
|
||||||
|
|
Loading…
Reference in a new issue