Skip to content

Commit

Permalink
Merge pull request #6 from arduino/umbynos/enhance_release_files_2
Browse files Browse the repository at this point in the history
place license in the created folder too, followup of #3
  • Loading branch information
umbynos authored Sep 20, 2021
2 parents 6c0ad59 + f408750 commit d8468df
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions DistTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe
zip {{.PACKAGE_NAME}} ../LICENSE.txt -j
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe {{.PLATFORM_DIR}}/LICENSE.txt
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -63,14 +64,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe
zip {{.PACKAGE_NAME}} ../LICENSE.txt -j
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe {{.PLATFORM_DIR}}/LICENSE.txt
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -86,13 +88,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -108,13 +112,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -130,13 +136,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -152,13 +160,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand Down Expand Up @@ -202,17 +212,19 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6"
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_64"
BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}}"
BUILD_PLATFORM: "linux/arm64"
CONTAINER_TAG: "{{.GO_VERSION}}-arm"
Expand All @@ -224,13 +236,15 @@ tasks:
dir: "{{.DIST_DIR}}"
cmds:
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz {{.PLATFORM_DIR}} ../LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand Down

0 comments on commit d8468df

Please sign in to comment.