mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
add buildtime
This commit is contained in:
parent
573ca55c50
commit
c1b6095410
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module github.com/scripthaus-dev/mshell
|
module github.com/scripthaus-dev/mshell
|
||||||
|
|
||||||
go 1.17
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alessio/shellescape v1.4.1
|
github.com/alessio/shellescape v1.4.1
|
||||||
|
@ -22,6 +22,8 @@ import (
|
|||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var BuildTime = "-"
|
||||||
|
|
||||||
// func doMainRun(pk *packet.RunPacketType, sender *packet.PacketSender) {
|
// func doMainRun(pk *packet.RunPacketType, sender *packet.PacketSender) {
|
||||||
// err := shexec.ValidateRunPacket(pk)
|
// err := shexec.ValidateRunPacket(pk)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# @scripthaus command build
|
# @scripthaus command build
|
||||||
go build -ldflags="-s -w" -o bin/mshell-v0.2-darwin.amd64 main-mshell.go
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||||
|
go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.2-darwin.amd64 main-mshell.go
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# @scripthaus command fullbuild
|
# @scripthaus command fullbuild
|
||||||
go build -ldflags="-s -w" -o /Users/mike/.mshell/mshell-v0.2 main-mshell.go
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o bin/mshell-v0.2-linux.amd64 main-mshell.go
|
go build -ldflags="$GO_LDFLAGS" -o /Users/mike/.mshell/mshell-v0.2 main-mshell.go
|
||||||
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o bin/mshell-v0.2-linux.arm64 main-mshell.go
|
GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.2-linux.amd64 main-mshell.go
|
||||||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o bin/mshell-v0.2-darwin.amd64 main-mshell.go
|
GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.2-linux.arm64 main-mshell.go
|
||||||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o bin/mshell-v0.2-darwin.arm64 main-mshell.go
|
GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.2-darwin.amd64 main-mshell.go
|
||||||
|
GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.2-darwin.arm64 main-mshell.go
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user