Skip to content

Commit

Permalink
cicd: add script to edit module for nightly
Browse files Browse the repository at this point in the history
This script should automate editing the clair module so that it builds
against claircore's main branch. The idea is to run this in a CI job,
build the resulting code, and then throw away the modifications.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Sep 13, 2021
1 parent 6b7029d commit e36bc82
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/script/nightly-module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
: ${CLAIRCORE_BRANCH:=main}
: ${GO_VERSION:=1.17}
test "${#GO_VERSION}" -gt 4 && GO_VERSION=${GO_VERSION%.*}

cd $(git rev-parse --show-toplevel)
echo '#' "$(go version)"
go mod edit "-go=${GO_VERSION}"\
"-replace=github.com/quay/claircore=github.com/quay/claircore@${CLAIRCORE_BRANCH}"
git diff
test -d vendor && rm -rf vendor
go mod tidy

0 comments on commit e36bc82

Please sign in to comment.