Skip to content

Commit 90cb450

Browse files
committed
Fix go install.sh
1 parent aa48725 commit 90cb450

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.pipelines/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
version: "1.19.9"
4141

4242
- script: |
43+
set -e
44+
set -x
4345
mkdir manifest
4446
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
4547
chmod +x hack/ensure-kustomize.sh

scripts/go_install.sh

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
15+
set -x
16+
set -e
1617
set -o errexit
1718
set -o nounset
1819
set -o pipefail
@@ -37,20 +38,9 @@ if [ -z "${GOBIN}" ]; then
3738
exit 1
3839
fi
3940

40-
tmp_dir=$(mktemp -d -t goinstall_XXXXXXXXXX)
41-
function clean {
42-
rm -rf "${tmp_dir}"
43-
}
44-
trap clean EXIT
45-
46-
rm "${GOBIN}/${2}"* || true
47-
48-
cd "${tmp_dir}"
49-
50-
# create a new module in the tmp directory
51-
go mod init fake/mod
41+
rm "${GOBIN}/${2}"* 2> /dev/null || true
5242

5343
# install the golang module specified as the first argument
54-
go get -tags tools "${1}@${3}"
44+
go install -tags capztools "${1}@${3}"
5545
mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}"
5646
ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}"

0 commit comments

Comments
 (0)