File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -eux
33
4+ function _remove_exe_extension() {
5+ local file_path
6+ file_path=" ${1} "
7+ file_dir=$( dirname " $file_path " )
8+ file_dir=$( realpath " $file_dir " )
9+ file_basename=$( basename " $file_path " ' .exe' )
10+ mv " $file_path " " $file_dir " /" $file_basename "
11+ }
12+ function files::remove_exe_extensions() {
13+ local target_dir
14+ target_dir=" ${1} "
15+
16+ for file in $( find " $target_dir " -type f -name ' *.exe' ) ; do
17+ _remove_exe_extension " $file "
18+ done
19+ }
20+
421[[ $OS =~ windows ]] && FILE_EXT=' .exe' || FILE_EXT=' '
522
623export CGO_ENABLED=0
@@ -18,9 +35,11 @@ mkdir -p "$DROPGZ_BUILD_DIR"
1835
1936echo >&2 " ##[section]Construct DropGZ Embedded Payload"
2037pushd " $PAYLOAD_DIR "
21- [[ -n $( stat " $OUT_DIR " /files 2> /dev/null || true) ]] && cp " $OUT_DIR " /files/* .
22- [[ -n $( stat " $OUT_DIR " /scripts 2> /dev/null || true) ]] && cp " $OUT_DIR " /scripts/* .
23- [[ -n $( stat " $OUT_DIR " /bin 2> /dev/null || true) ]] && cp " $OUT_DIR " /bin/* .
38+ [[ -d " $OUT_DIR " /files ]] && cp " $OUT_DIR " /files/* . || true
39+ [[ -d " $OUT_DIR " /scripts ]] && cp " $OUT_DIR " /scripts/* . || true
40+ [[ -d " $OUT_DIR " /bin ]] && cp " $OUT_DIR " /bin/* . || true
41+
42+ [[ $OS =~ windows ]] && files::remove_exe_extensions .
2443
2544 sha256sum * > sum.txt
2645 gzip --verbose --best --recursive .
Original file line number Diff line number Diff line change @@ -248,8 +248,8 @@ stages:
248248 platforms :
249249 - platform : linux/amd64
250250 imageReference : $(IPV6_LINUX_AMD64_REF)
251- # - platform: linux/arm64
252- # imageReference: $(IPV6_LINUX_ARM64_REF)
251+ - platform : linux/arm64
252+ imageReference : $(IPV6_LINUX_ARM64_REF)
253253 - job : npm
254254 templateContext :
255255 name : npm
You can’t perform that action at this time.
0 commit comments