mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-04 03:48:58 +00:00
build m1 and windows (#395)
This commit is contained in:
parent
991eb2ab16
commit
4e50e17d81
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@ -14,6 +14,10 @@ jobs:
|
|||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Go 1.16
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.16'
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Set up Cloud SDK
|
- name: Set up Cloud SDK
|
||||||
|
@ -27,8 +27,9 @@ build-all: ## Build for all supported platforms.
|
|||||||
@mkdir -p bin && sed s/_SEM_VER_/$(SEM_VER)/g README.md.TEMPLATE > bin/README.md
|
@mkdir -p bin && sed s/_SEM_VER_/$(SEM_VER)/g README.md.TEMPLATE > bin/README.md
|
||||||
@$(MAKE) build GOOS=darwin GOARCH=amd64
|
@$(MAKE) build GOOS=darwin GOARCH=amd64
|
||||||
@$(MAKE) build GOOS=linux GOARCH=amd64
|
@$(MAKE) build GOOS=linux GOARCH=amd64
|
||||||
@# $(MAKE) build GOOS=darwin GOARCH=arm64
|
@$(MAKE) build GOOS=darwin GOARCH=arm64
|
||||||
@# $(MAKE) GOOS=windows GOARCH=amd64
|
@$(MAKE) build GOOS=windows GOARCH=amd64
|
||||||
|
@mv ./bin/mizu_windows_amd64 ./bin/mizu.exe
|
||||||
@# $(MAKE) GOOS=linux GOARCH=386
|
@# $(MAKE) GOOS=linux GOARCH=386
|
||||||
@# $(MAKE) GOOS=windows GOARCH=386
|
@# $(MAKE) GOOS=windows GOARCH=386
|
||||||
@# $(MAKE) GOOS=linux GOARCH=arm64
|
@# $(MAKE) GOOS=linux GOARCH=arm64
|
||||||
|
@ -2,16 +2,25 @@
|
|||||||
|
|
||||||
Download Mizu for your platform
|
Download Mizu for your platform
|
||||||
|
|
||||||
**Mac** (on Intel chip)
|
**Mac** (Intel)
|
||||||
```
|
```
|
||||||
curl -Lo mizu https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu_darwin_amd64 && chmod 755 mizu
|
curl -Lo mizu https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu_darwin_amd64 && chmod 755 mizu
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Mac** (Apple M1 silicon)
|
||||||
|
```
|
||||||
|
curl -Lo mizu https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu_darwin_arm64 && chmod 755 mizu
|
||||||
|
```
|
||||||
|
|
||||||
**Linux**
|
**Linux**
|
||||||
```
|
```
|
||||||
curl -Lo mizu https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu_linux_amd64 && chmod 755 mizu
|
curl -Lo mizu https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu_linux_amd64 && chmod 755 mizu
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Windows** (Intel 64bit)
|
||||||
|
```
|
||||||
|
curl -LO https://github.com/up9inc/mizu/releases/download/_SEM_VER_/mizu.exe
|
||||||
|
```
|
||||||
|
|
||||||
### Checksums
|
### Checksums
|
||||||
SHA256 checksums available for compiled binaries.
|
SHA256 checksums available for compiled binaries.
|
||||||
|
@ -85,7 +85,13 @@ func CheckNewerVersion(versionChan chan string) {
|
|||||||
logger.Log.Debugf("Finished version validation, github version %v, current version %v, took %v", gitHubVersion, currentSemVer, time.Since(start))
|
logger.Log.Debugf("Finished version validation, github version %v, current version %v, took %v", gitHubVersion, currentSemVer, time.Since(start))
|
||||||
|
|
||||||
if gitHubVersionSemVer.GreaterThan(currentSemVer) {
|
if gitHubVersionSemVer.GreaterThan(currentSemVer) {
|
||||||
versionChan <- fmt.Sprintf("Update available! %v -> %v (curl -Lo mizu %v/mizu_%s_amd64 && chmod 755 mizu)", mizu.SemVer, gitHubVersion, strings.Replace(*latestRelease.HTMLURL, "tag", "download", 1), runtime.GOOS)
|
var downloadMessage string
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
downloadMessage = fmt.Sprintf("curl -LO %v/mizu.exe", strings.Replace(*latestRelease.HTMLURL, "tag", "download", 1))
|
||||||
|
} else {
|
||||||
|
downloadMessage = fmt.Sprintf("curl -Lo mizu %v/mizu_%s_%s && chmod 755 mizu", strings.Replace(*latestRelease.HTMLURL, "tag", "download", 1), runtime.GOOS, runtime.GOARCH)
|
||||||
|
}
|
||||||
|
versionChan <- fmt.Sprintf("Update available! %v -> %v (%s)", mizu.SemVer, gitHubVersion, downloadMessage)
|
||||||
} else {
|
} else {
|
||||||
versionChan <- ""
|
versionChan <- ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user