Skip to content

Commit

Permalink
Restored the correct package format for the Arduino package_index.json (
Browse files Browse the repository at this point in the history
#78)

The archive must contain a folder with all the files inside it.
  • Loading branch information
cmaglie authored Feb 21, 2024
1 parent 7c8454b commit 463b627
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 @@ -41,13 +41,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=0 \
{{.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
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -63,13 +65,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=0 \
{{.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
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -85,13 +89,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=0 \
{{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -107,13 +113,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=0 \
{{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -129,13 +137,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=0 \
{{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -151,13 +161,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=0 \
{{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand Down Expand Up @@ -205,13 +217,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=0 \
{{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand All @@ -228,13 +242,15 @@ tasks:
cmds:
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=0 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "git config --global --add safe.directory /home/build && {{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand Down Expand Up @@ -264,13 +280,15 @@ tasks:
cmds:
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
- |
mkdir {{.PLATFORM_DIR}}
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=0 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "git config --global --add safe.directory /home/build && {{.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}}
sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}}
vars:
Expand Down

0 comments on commit 463b627

Please sign in to comment.