Просмотр исходного кода

Merge branch 'staging' of https://github.com/porter-dev/porter into staging

sunguroku 5 лет назад
Родитель
Сommit
7e3534c2d4
3 измененных файлов с 44 добавлено и 3 удалено
  1. 32 0
      .goreleaser.yml
  2. 12 1
      docs/DEVELOPING.md
  3. 0 2
      go.mod

+ 32 - 0
.goreleaser.yml

@@ -0,0 +1,32 @@
+before:
+  hooks:
+    - go mod download
+builds:
+  - id: "porter-cli"
+    env:
+      - CGO_ENABLED=1
+    dir: cli
+    main: ./cli/main.go
+    goos:
+      - linux
+      - windows
+      - darwin
+    flags:
+      - -tags=cli
+archives:
+  - replacements:
+      darwin: Darwin
+      linux: Linux
+      windows: Windows
+      386: i386
+      amd64: x86_64
+checksum:
+  name_template: 'checksums.txt'
+snapshot:
+  name_template: "{{ .Tag }}-next"
+changelog:
+  sort: asc
+  filters:
+    exclude:
+      - '^docs:'
+      - '^test:'

+ 12 - 1
docs/DEVELOPING.md

@@ -14,4 +14,15 @@ From the root directory, run `go test ./...` to run all tests and ensure the bui
 
 From the root directory, run `DOCKER_BUILDKIT=1 docker build . --file ./docker/Dockerfile -t porter`. Then you can run `docker run -p 8080:8080 porter`. 
 
-To build the test container, run `DOCKER_BUILDKIT=1 docker build . --file ./docker/Dockerfile -t porter-test --target porter-test`. 
+To build the test container, run `DOCKER_BUILDKIT=1 docker build . --file ./docker/Dockerfile -t porter-test --target porter-test`. 
+
+### CLI Release
+
+```sh
+docker run --rm --privileged \
+-v $PWD:/go/src/github.com/porter-dev/porter \
+-v /var/run/docker.sock:/var/run/docker.sock \
+-w /go/src/github.com/porter-dev/porter \
+-e GORELEASER_GITHUB_TOKEN='THEGITHUBTOKEN' \
+mailchain/goreleaser-xcgo ""
+```

+ 0 - 2
go.mod

@@ -30,7 +30,6 @@ require (
 	github.com/joeshaw/envdecode v0.0.0-20200121155833-099f1fc765bd
 	github.com/json-iterator/go v1.1.10 // indirect
 	github.com/kr/pretty v0.2.0 // indirect
-	github.com/leodido/go-urn v1.2.0 // indirect
 	github.com/mattn/go-colorable v0.1.7 // indirect
 	github.com/pelletier/go-toml v1.8.1 // indirect
 	github.com/pkg/errors v0.9.1
@@ -58,7 +57,6 @@ require (
 	k8s.io/client-go v0.18.8
 	k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac // indirect
 	k8s.io/helm v2.16.12+incompatible
-	k8s.io/klog v1.0.0 // indirect
 	k8s.io/klog/v2 v2.2.0 // indirect
 	k8s.io/utils v0.0.0-20200912215256-4140de9c8800 // indirect
 	sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect