Selaa lähdekoodia

packaging: Add EULA

Signed-off-by: Chris Crone <[email protected]>
Chris Crone 5 vuotta sitten
vanhempi
sitoutus
2aea82a7c6
5 muutettua tiedostoa jossa 17 lisäystä ja 2 poistoa
  1. 1 0
      .dockerignore
  2. 2 2
      .github/workflows/release.yaml
  3. 1 0
      .gitignore
  4. 11 0
      builder.Makefile
  5. 2 0
      packaging/LICENSE

+ 1 - 0
.dockerignore

@@ -1,3 +1,4 @@
 .git/
 bin/
+dist/
 tests/node-client/node_modules/

+ 2 - 2
.github/workflows/release.yaml

@@ -25,10 +25,10 @@ jobs:
             ${{ runner.os }}-go-
 
       - name: Build
-        run: make -f builder.Makefile cross
+        run: make -f builder.Makefile package
 
       - uses: ncipollo/release-action@v1
         with:
-          artifacts: "bin/*"
+          artifacts: "dist/*"
           prerelease: true
           token: ${{ secrets.GITHUB_TOKEN }}

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 bin/
+dist/

+ 11 - 0
builder.Makefile

@@ -37,6 +37,11 @@ ifdef BUILD_TAGS
   TAGS=-tags $(BUILD_TAGS)
 endif
 
+TAR_TRANSFORM:=--transform s/packaging/docker/ --transform s/bin/docker/
+ifneq ($(findstring bsd,$(shell tar --version)),)
+  TAR_TRANSFORM=-s /packaging/docker/ -s /bin/docker/
+endif
+
 all: cli
 
 .PHONY: protos
@@ -73,3 +78,9 @@ check-license-headers:
 check-go-mod:
 	./scripts/validate/check-go-mod
 
+.PHONY: package
+package: cross
+	mkdir -p dist
+	tar -czf dist/docker-linux-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-linux-amd64
+	tar -czf dist/docker-darwin-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-darwin-amd64
+	rm -f dist/docker-windows-amd64.zip && zip dist/docker-windows-amd64.zip -j packaging/LICENSE $(BINARY)-windows-amd64.exe

+ 2 - 0
packaging/LICENSE

@@ -0,0 +1,2 @@
+The Docker End User License Agreement (https://www.docker.com/legal/docker-software-end-user-license-agreement) describes Docker's Terms for this software.
+By downloading, accessing, or using this software you expressly accept and agree to the Terms set out in the Docker End User License Agreement.