From ec0f107ef5639dbd92ba9aaa3793938ed77a6663 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Tue, 19 Apr 2022 10:00:41 -0400 Subject: [PATCH] fix(build): Run plugin script directly instead of with sh (#2025) These github actions run on Ubuntu based machine. Ubuntu by default links `/bin/sh` to dash. So by invoking the plugin.sh script as `/bin/sh ./plugins.sh` the script would run under `dash` despite the shebang line. A recent change that unified some of the build process, introduced additional bashisms into this script which is caused the build to fail. This updated the build system to just run the script directly, which will honor the shebang line. This seems like the best approach since the ubuntu machine has bash and the shebang line points to bash, so it is natural for developers to assume bashisms will work. See: f370abc1dace6f28b2de81d079de86a98a2bfd93 https://github.com/actions/virtual-environments/blob/ubuntu20/20220410.2/images/linux/Ubuntu2004-Readme.md https://wiki.ubuntu.com/DashAsBinSh --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74d82b52a..79ca88346 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,7 @@ jobs: mkdir -p dist out unset GOPATH; # Build plugins - sh ./scripts/plugins.sh + ./scripts/plugins.sh go build -v -tags "ui" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/ - uses: actions/upload-artifact@v2 @@ -190,7 +190,7 @@ jobs: mkdir -p dist out unset GOPATH; # Build plugins - sh ./scripts/plugins.sh + ./scripts/plugins.sh go build -v -tags "ui" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/ - uses: actions/upload-artifact@v2 @@ -283,7 +283,7 @@ jobs: mkdir -p dist out unset GOPATH; # Build plugins - sh ./scripts/plugins.sh + ./scripts/plugins.sh go build -v -tags "ui netcgo" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/ - uses: actions/upload-artifact@v2