@@ -41,7 +41,7 @@ get_version_vars() {
4141 if [[ $GIT_TAG ]]; then
4242 GIT_VERSION=$GIT_TAG
4343 fi
44- GIT_COMMIT=` git rev-parse --short HEAD || true`
44+ GIT_COMMIT=$( git rev-parse --short HEAD || true)
4545 if [[ -z $GIT_COMMIT ]]; then
4646 GIT_COMMIT=" 0.0.0"
4747 fi
@@ -95,28 +95,28 @@ build_binaries() {
9595 get_version_vars
9696 goldflags=" ${GOLDFLAGS=-s -w} $( ldflags) "
9797 osarch=${1-} _${2-}
98- mkdir -p $THIS_PLATFORM_ASSETS
98+ mkdir -p " $THIS_PLATFORM_ASSETS "
9999 tarFile=" ${GIT_VERSION} -${1-} -${2-} .tar.gz"
100100
101101 debug " !!! build $osarch sealer"
102- GOOS=${1-} GOARCH=${2-} go build -o $THIS_PLATFORM_BIN /sealer/$osarch /sealer -mod vendor -ldflags " $goldflags " $SEALER_ROOT /cmd/sealer/main.go
102+ GOOS=${1-} GOARCH=${2-} go build -o " $THIS_PLATFORM_BIN " /sealer/" $osarch " /sealer -mod vendor -ldflags " $goldflags " " $SEALER_ROOT " /cmd/sealer/main.go
103103 check $? " build $osarch sealer"
104104 debug " output bin: $THIS_PLATFORM_BIN /sealer/$osarch /sealer"
105- cd ${SEALER_ROOT} /_output/bin/sealer/$osarch /
106- tar czf sealer-$tarFile sealer
107- sha256sum sealer-$tarFile > sealer-$tarFile .sha256sum
108- mv * .tar.gz* $THIS_PLATFORM_ASSETS /
105+ cd " ${SEALER_ROOT} " /_output/bin/sealer/" $osarch " / || exit
106+ tar czf sealer-" $tarFile " sealer
107+ sha256sum sealer-" $tarFile " > sealer-" $tarFile " .sha256sum
108+ mv * .tar.gz* " $THIS_PLATFORM_ASSETS " /
109109 debug " output tar.gz: $THIS_PLATFORM_ASSETS /sealer-$tarFile "
110110 debug " output sha256sum: $THIS_PLATFORM_ASSETS /sealer-$tarFile .sha256sum"
111111
112112 debug " !!! build $osarch seautil"
113- GOOS=${1-} GOARCH=${2-} go build -o $THIS_PLATFORM_BIN /seautil/$osarch /seautil -mod vendor -ldflags " $goldflags " $SEALER_ROOT /cmd/seautil/main.go
113+ GOOS=${1-} GOARCH=${2-} go build -o " $THIS_PLATFORM_BIN " /seautil/" $osarch " /seautil -mod vendor -ldflags " $goldflags " " $SEALER_ROOT " /cmd/seautil/main.go
114114 check $? " build $osarch seautil"
115115 debug " output bin: $THIS_PLATFORM_BIN /seautil/$osarch /seautil"
116- cd ${SEALER_ROOT} /_output/bin/seautil/$osarch /
117- tar czf seautil-$tarFile seautil
118- sha256sum seautil-$tarFile > seautil-$tarFile .sha256sum
119- mv * .tar.gz* $THIS_PLATFORM_ASSETS /
116+ cd " ${SEALER_ROOT} " /_output/bin/seautil/" $osarch " / || exit
117+ tar czf seautil-" $tarFile " seautil
118+ sha256sum seautil-" $tarFile " > seautil-" $tarFile " .sha256sum
119+ mv * .tar.gz* " $THIS_PLATFORM_ASSETS " /
120120 debug " output tar.gz: $THIS_PLATFORM_ASSETS /seautil-$tarFile "
121121 debug " output sha256sum: $THIS_PLATFORM_ASSETS /seautil-$tarFile .sha256sum"
122122
@@ -130,9 +130,9 @@ if [[ $MULTI_PLATFORM_BUILD ]]; then
130130 for platform in " ${SEALER_SUPPORTED_PLATFORMS[@]} " ; do
131131 OS=${platform%/* }
132132 ARCH=${platform##*/ }
133- build_binaries $OS $ARCH
133+ build_binaries " $OS " " $ARCH "
134134 done ;
135135else
136- build_binaries ` go env GOOS` ` go env GOARCH`
136+ build_binaries " $( go env GOOS) " " $( go env GOARCH) "
137137fi
138138
0 commit comments