mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
* chore: add /v2 to import module path go mod requires semantic versioning with versions greater than 1.x This was a mechanical update by running: ``` go install github.com/marwan-at-work/mod/cmd/mod@latest mod upgrade ``` Migrate generated files to import /v2 * Fix gen
24 lines
681 B
Bash
Executable File
24 lines
681 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This file checks all our AGPL licensed source files to be sure they don't
|
|
# import any enterprise licensed packages (the inverse is fine).
|
|
|
|
set -euo pipefail
|
|
# shellcheck source=scripts/lib.sh
|
|
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
|
cdroot
|
|
|
|
set +e
|
|
find . -regex ".*\.go" |
|
|
grep -v "./enterprise" |
|
|
grep -v ./scripts/auditdocgen/ --include="*.go" |
|
|
grep -v ./scripts/clidocgen/ --include="*.go" |
|
|
xargs grep -n "github.com/coder/coder/v2/enterprise"
|
|
# reverse the exit code because we want this script to fail if grep finds anything.
|
|
status=$?
|
|
set -e
|
|
if [ $status -eq 0 ]; then
|
|
error "AGPL code cannot import enterprise!"
|
|
fi
|
|
log "AGPL imports OK"
|