Skip to content

Commit

Permalink
chore: Add License
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag Rajawat <[email protected]>
  • Loading branch information
anurag-rajawat committed Sep 20, 2024
1 parent ce2c0f1 commit 0772a87
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ header:

paths-ignore:
- "protobuf/*"
# Explicitly mention generated go files otherwise the check won't pass.
- "protobuf/**/*.go"

comment: on-failure

Expand Down
3 changes: 3 additions & 0 deletions protobuf/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Authors of SentryFlow

PROTOS:="sentryflow.proto sentryflow_metrics.proto"

.PHONY: help
Expand Down
20 changes: 20 additions & 0 deletions scripts/add-license-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Authors of SentryFlow

if ! command -v addlicense >/dev/null; then
echo "Installing addlicense..."
go install github.com/google/addlicense@latest
fi

GIT_ROOT=$(git rev-parse --show-toplevel)
LICENSE_HEADER=${GIT_ROOT}/scripts/license.header

if [ -z "$1" ]; then
echo "No Argument Supplied, Checking and Fixing all files from project root"
find "${GIT_ROOT}" -name "*.sh" -or -name "*.go" | xargs -I {} addlicense -f "${LICENSE_HEADER}" -v {}
echo "Done"
else
addlicense -f "${LICENSE_HEADER}" -v "$1"
echo "Done"
fi
2 changes: 2 additions & 0 deletions scripts/license.header
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-License-Identifier: Apache-2.0
Copyright 2024 Authors of SentryFlow
4 changes: 4 additions & 0 deletions sentryflow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ golangci-lint:
lint: golangci-lint ## Run golangci-lint linter
@$(GOLANGCI_LINT) run

.PHONY: license
license: ## Check and fix license header on all go files
@../scripts/add-license-header

##@ Build

.PHONY: build
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package cmd

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package cmd

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package config

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/core/sentryflow.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package core

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/core/server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package core

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package exporter

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/k8s/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package k8s

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/receiver/receiver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package receiver

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/receiver/svcmesh/istio/sidecar/sidecar.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package sidecar

import (
Expand Down
3 changes: 3 additions & 0 deletions sentryflow/pkg/util/util.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Authors of SentryFlow

package util

import (
Expand Down

0 comments on commit 0772a87

Please sign in to comment.