Commit graph

7 commits

Author SHA1 Message Date
Valentin Rothberg caaaa2c5e1 hack/install_golangci.sh: smarter install
Detect if the installed version of golangci-lint is outdated and update
it if needed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:15:23 +01:00
Valentin Rothberg f38b7f48cc golangci-lint: install to ./bin
Install golangci-lint to `./bin` instead of `$GOBIN`.  The latter may be
shared with other projects who require a different version.  Having a
shared version of golangci-lint is a reoccurring source of red herrings
on my work station, so I think it's time to split them.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:07:04 +01:00
Josh Soref 4fa1fce930 Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-12-22 13:34:31 -05:00
Sascha Grunert ba9f18e2b8
Use bash binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-17 10:42:23 +02:00
Chris Evich d0782e7839
Cirrus: Fix gate image & false-positive exits
A number of scripts relating to tooling used and the gate container
image were not exiting upon errors as intended.  Coupled with
external service unavailability (i.e. downloading golangci-lint)
was observed to cause difficult to debug failures.

This change corrects the scripts inside/out of the gate container as
well as fixes many golang related path consistency problems vs other CI
jobs.  After this change, all jobs use consistent path names reducing
the number of special-case overrides needed.

Lastly, I also made a documentation-pass, updating/correcting as needed,
including documenting a likely local validation-failure mode, related to
`$EPOCH_TEST_COMMIT`.  This is dependent on the developers git
environment, so documentation is the only possible "fix".

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-02 08:50:54 -05:00
Valentin Rothberg d4ca3197b6 hack/install_golangci.sh: check env vars
Also make it executable and `set -eo pipefail`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-16 15:26:25 +01:00
Valentin Rothberg b830d3eb07 make .install.golangci-lint: force specific version
Instead of only performing a presence check of the binary, also do a
version check and force installing the specified one if needed.  This
will prevent users and the CI from using a wrong version in the future.

Move the logic into a dedicated shell script as I find built-in bash in
Makefiles hard to maintain.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-15 08:55:46 +01:00