Skip to content

Commit

Permalink
Merge pull request #59 from MatteoPologruto/fix-release-packaging
Browse files Browse the repository at this point in the history
Create archive with upper level directory
  • Loading branch information
MatteoPologruto authored Feb 6, 2023
2 parents 6aa0be6 + a59cbac commit 4453ccb
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions DistTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,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 ../LICENSE.txt -j
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe {{.PLATFORM_DIR}}/LICENSE.txt
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_windows_386"
Expand All @@ -48,13 +50,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 ../LICENSE.txt -j
zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe {{.PLATFORM_DIR}}/LICENSE.txt
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_windows_amd64"
Expand All @@ -69,13 +73,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_amd32"
Expand All @@ -90,13 +96,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_amd64"
Expand All @@ -111,13 +119,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_7"
Expand All @@ -132,13 +142,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6"
Expand Down Expand Up @@ -181,13 +193,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_64"
Expand All @@ -202,13 +216,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_amd64"
Expand Down Expand Up @@ -236,13 +252,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 -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
vars:
PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_arm64"
Expand Down

0 comments on commit 4453ccb

Please sign in to comment.