From 90bd68e44ce3575a1db38c4ecfb16c89d0f0674b Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Tue, 11 Aug 2020 09:54:04 -0400 Subject: [PATCH] Disable prerelease version update check (#140) * disable prerelease version update check Signed-off-by: Alex Goodman * use prerelease flag as source of truth for user notifications Signed-off-by: Alex Goodman --- .github/scripts/update-version-file.sh | 4 +++- .github/workflows/acceptance-test.yaml | 6 ------ .github/workflows/release.yaml | 6 ------ Makefile | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/scripts/update-version-file.sh b/.github/scripts/update-version-file.sh index 726afa58f..6155338ff 100755 --- a/.github/scripts/update-version-file.sh +++ b/.github/scripts/update-version-file.sh @@ -5,7 +5,9 @@ BIN="syft" DISTDIR=$1 VERSION=$2 -if [[ $VERSION == *-* ]] ; then +# the source of truth as to whether we want to notify users of an update is if the release just created is NOT +# flagged as a pre-release on github +if [[ "$(curl -SsL https://api.github.com/repos/anchore/${BIN}/releases/tags/${VERSION} | jq .prerelease)" == "true" ]] ; then echo "skipping publishing a version file (this is a pre-release: ${VERSION})" exit 0 fi diff --git a/.github/workflows/acceptance-test.yaml b/.github/workflows/acceptance-test.yaml index 344877b5a..37a9a7caf 100644 --- a/.github/workflows/acceptance-test.yaml +++ b/.github/workflows/acceptance-test.yaml @@ -17,12 +17,6 @@ jobs: runs-on: ubuntu-latest steps: - # TODO: remove me after release - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.ANCHORE_GIT_READ_TOKEN }} - run: git config --global url."https://anchore:${TOKEN}@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@v2 with: go-version: ${{ env.GO_VERSION }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d38e6aa81..9383b40b1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -75,12 +75,6 @@ jobs: runs-on: ubuntu-latest steps: - # TODO: remove me after release - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.ANCHORE_GIT_READ_TOKEN }} - run: git config --global url."https://anchore:${TOKEN}@github.com".insteadOf "https://github.com" - - uses: actions/setup-go@v2 with: go-version: ${{ env.GO_VERSION }} diff --git a/Makefile b/Makefile index e1828e10e..88b29e280 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ help: .PHONY: ci-bootstrap ci-bootstrap: bootstrap - sudo apt install -y bc + sudo apt update && sudo apt install -y bc jq .PHONY: bootstrap bootstrap: ## Download and install all go dependencies (+ prep tooling in the ./tmp dir)