Skip to content

Commit 292afdc

Browse files
committed
Add license header to files (#14)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 35bd620 commit 292afdc

File tree

19 files changed

+251
-9
lines changed

19 files changed

+251
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ jobs:
2727
run: echo ${{ steps.buildx.outputs.platforms }}
2828

2929
- name: Run checks
30-
run: make ci
30+
run: |
31+
sudo apt-get -qq update
32+
sudo apt-get install -y bzr
33+
make ci
3134
3235
- name: Build
3336
env:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6+
- '*.*'
67
- '*.*.*'
78

89
jobs:

Dockerfile.dbg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright The Stash Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
FROM debian:stretch
216

317
ENV DEBIAN_FRONTEND noninteractive

Dockerfile.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright The Stash Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
FROM debian:stretch
216

317
ENV DEBIAN_FRONTEND noninteractive

Makefile

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ BUILD_DIRS := bin/$(OS)_$(ARCH) \
9191
DOCKERFILE_PROD = Dockerfile.in
9292
DOCKERFILE_DBG = Dockerfile.dbg
9393

94+
DOCKER_REPO_ROOT := /go/src/$(GO_PKG)/$(REPO)
95+
9496
# If you want to build all binaries, see the 'all-build' rule.
9597
# If you want to build all containers, see the 'all-container' rule.
9698
# If you want to build AND push all containers, see the 'all-push' rule.
@@ -307,8 +309,34 @@ verify-gen: gen fmt
307309
echo "files are out of date, run make gen fmt"; exit 1; \
308310
fi
309311

312+
.PHONY: add-license
313+
add-license:
314+
@echo "Adding license header"
315+
@docker run --rm \
316+
-u $$(id -u):$$(id -g) \
317+
-v /tmp:/.cache \
318+
-v $$(pwd):$(DOCKER_REPO_ROOT) \
319+
-w $(DOCKER_REPO_ROOT) \
320+
--env HTTP_PROXY=$(HTTP_PROXY) \
321+
--env HTTPS_PROXY=$(HTTPS_PROXY) \
322+
$(BUILD_IMAGE) \
323+
ltag -t "./hack/license" --excludes "vendor contrib" -v
324+
325+
.PHONY: check-license
326+
check-license:
327+
@echo "Checking files for license header"
328+
@docker run --rm \
329+
-u $$(id -u):$$(id -g) \
330+
-v /tmp:/.cache \
331+
-v $$(pwd):$(DOCKER_REPO_ROOT) \
332+
-w $(DOCKER_REPO_ROOT) \
333+
--env HTTP_PROXY=$(HTTP_PROXY) \
334+
--env HTTPS_PROXY=$(HTTPS_PROXY) \
335+
$(BUILD_IMAGE) \
336+
ltag -t "./hack/license" --excludes "vendor contrib" --check -v
337+
310338
.PHONY: ci
311-
ci: verify lint build unit-tests #cover
339+
ci: verify check-license lint build unit-tests #cover
312340

313341
.PHONY: qa
314342
qa:

cmd/stash-mysql/main.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright The Stash Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
package main
218

319
import (

cmd/stash-mysql/version.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright The Stash Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
package main
218

319
import (

hack/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2019 AppsCode Inc.
4-
# Copyright 2016 The Kubernetes Authors.
3+
# Copyright The Stash Authors.
54
#
65
# Licensed under the Apache License, Version 2.0 (the "License");
76
# you may not use this file except in compliance with the License.

hack/e2e.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright The Stash Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eou pipefail
18+
19+
export CGO_ENABLED=1
20+
export GO111MODULE=on
21+
export GOFLAGS="-mod=vendor"
22+
23+
GINKGO_ARGS=${GINKGO_ARGS:-}
24+
TEST_ARGS=${TEST_ARGS:-}
25+
DOCKER_REGISTRY=${DOCKER_REGISTRY:-}
26+
27+
echo "Running e2e tests:"
28+
cmd="ginkgo -r --v -race --progress --trace --noisyPendings=false ${GINKGO_ARGS} test -- --docker-registry=${DOCKER_REGISTRY} ${TEST_ARGS}"
29+
echo $cmd; $cmd

hack/fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2019 AppsCode Inc.
3+
# Copyright The Stash Authors.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)