From 479c709b0e926a2e7f07adef15f6c0134a668c5b Mon Sep 17 00:00:00 2001 From: Rogerio Peixoto Date: Mon, 14 Jun 2021 15:55:57 +0100 Subject: [PATCH] fix(ci): install script not adjusting arch from amd64 to x64 (#3632) closes #3631 --- .goreleaser-nightly.yml | 13 +++++++++++-- install.sh | 19 ++++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.goreleaser-nightly.yml b/.goreleaser-nightly.yml index 6329096e233..6dc42805ee1 100644 --- a/.goreleaser-nightly.yml +++ b/.goreleaser-nightly.yml @@ -9,10 +9,18 @@ builds: - windows goarch: - amd64 + - arm64 + ignore: + - goos: darwin + goarch: 386 + - goos: linux + goarm: 7 + - goos: windows + goarm: 7 ldflags: - -s - -w - - -X github.com/Checkmarx/kics/internal/constants.Version={{ .Version }}-{{ .ShortCommit }} + - -X github.com/Checkmarx/kics/internal/constants.Version={{ .Version }}-{{ .ShortCommit }}-{{ .Date }} - -X github.com/Checkmarx/kics/internal/constants.SCMCommit={{ .Commit }} - -X github.com/Checkmarx/kics/internal/constants.SentryDSN={{ .Env.SENTRY_DSN }} archives: @@ -25,7 +33,8 @@ archives: 386: x32 files: - LICENSE - - assets/queries + - assets/queries/**/metadata.json + - assets/queries/**/*.rego - assets/libraries release: prerelease: true diff --git a/install.sh b/install.sh index 8727c1dce00..09329051720 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2021-06-02T10:19:42Z. DO NOT EDIT. +# Code generated by godownloader on 2021-06-14T06:07:18Z. DO NOT EDIT. # usage() { @@ -62,10 +62,12 @@ execute() { } get_binaries() { case "$PLATFORM" in - darwin/386) BINARIES="kics" ;; darwin/amd64) BINARIES="kics" ;; - linux/386) BINARIES="kics" ;; + darwin/arm64) BINARIES="kics" ;; linux/amd64) BINARIES="kics" ;; + linux/arm64) BINARIES="kics" ;; + windows/amd64) BINARIES="kics" ;; + windows/arm64) BINARIES="kics" ;; *) log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new" exit 1 @@ -89,14 +91,25 @@ tag_to_version() { } adjust_format() { # change format (tar.gz or zip) based on OS + case ${OS} in + windows) FORMAT=zip ;; + esac true } adjust_os() { # adjust archive name based on OS + case ${OS} in + 386) OS=x32 ;; + amd64) OS=x64 ;; + esac true } adjust_arch() { # adjust archive name based on ARCH + case ${ARCH} in + 386) ARCH=x32 ;; + amd64) ARCH=x64 ;; + esac true }