From 0b4f4fd703c79689af2487295b46526f2a9ec6a6 Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Fri, 12 Jan 2024 09:40:00 -0600 Subject: [PATCH] Backport of compliance: license checker to enforce MPL pre-EOY 2023 no longer necessary into release/1.17.x (#20185) backport of commit ea8fa35b37b6a1228545c98c150650a37be8ea3e Co-authored-by: Semir Patel --- .github/scripts/license_checker.sh | 20 -------------------- .github/workflows/license-checker.yml | 24 ------------------------ 2 files changed, 44 deletions(-) delete mode 100755 .github/scripts/license_checker.sh delete mode 100644 .github/workflows/license-checker.yml diff --git a/.github/scripts/license_checker.sh b/.github/scripts/license_checker.sh deleted file mode 100755 index e001832f1d49..000000000000 --- a/.github/scripts/license_checker.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: BUSL-1.1 - -if [[ ${GITHUB_BASE_REF} == release/1.14.* ]] || [[ ${GITHUB_BASE_REF} == release/1.15.* ]] || [[ ${GITHUB_BASE_REF} == release/1.16.* ]]; then - busl_files=$(grep -r 'SPDX-License-Identifier: BUSL' . --exclude-dir .github) - - if [ -n "$busl_files" ]; then - echo "Found BUSL occurrences in the PR branch! (See NET-5258 for details)" - echo -n "$busl_files" - exit 1 - else - echo "Did not find any occurrences of BUSL in the PR branch" - exit 0 - fi - echo "The variable starts with release/1.14, release/1.15, or release/1.17." -else - echo "Skipping BUSL check since ${GITHUB_BASE_REF} not one of release/1.14.*, release/1.15.*, or release/1.16.*." - exit 0 -fi \ No newline at end of file diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml deleted file mode 100644 index 93ac36e75dbd..000000000000 --- a/.github/workflows/license-checker.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -# This workflow checks that the BUSL license is not mentioned anywhere in -# a PR targeting a release that should maintain the MPL-2.0 license. -name: License Checker - -on: - pull_request: - # Logic to only apply check 1.1[4,5,6].x branches is in license_checker.sh - types: [opened, synchronize] - -jobs: - # checks that the diff does not contain any reference to - # the BUSL license and thus retains the MPL-2.0 license - license-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 # by default the checkout action doesn't checkout all branches - - name: Check for BUSL text in diff - run: ./.github/scripts/license_checker.sh