mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
* added script for table creation * added tags to audit-logs.md * removed log * removed empty block line * PR feedback * modify check_unstaged * third times the charm maybe * spelling * relative path * excluding from the right script this time * sorted resources to ensure table order * running make cmd * running make again * ensuring order on subtable
20 lines
618 B
Bash
Executable File
20 lines
618 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/main.go" | xargs grep -n "github.com/coder/coder/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"
|