From b32d023dca4fa71c915c8ce87f59cbfcbf683158 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 17 Mar 2019 12:14:12 -0700 Subject: [PATCH] improve headers --- LICENSE | 14 ++++++++----- main.go | 16 +++++++++++--- yaml/compiler/convert.go | 2 +- yaml/compiler/transform/limits.go | 3 ++- yaml/compiler/transform/limits_test.go | 17 ++++++++++++--- yaml/pipeline.go | 2 +- yaml/pretty/container.go | 18 +++++++++++----- yaml/pretty/container_test.go | 2 -- yaml/pretty/cron.go | 18 +++++++++++----- yaml/pretty/cron_test.go | 2 -- yaml/pretty/pipeline.go | 18 +++++++++++----- yaml/pretty/pipeline_test.go | 2 -- yaml/pretty/pretty.go | 18 +++++++++++----- yaml/pretty/pretty_oss.go | 29 -------------------------- yaml/pretty/pretty_test.go | 2 -- yaml/pretty/registry.go | 18 +++++++++++----- yaml/pretty/registry_test.go | 2 -- yaml/pretty/secret.go | 18 +++++++++++----- yaml/pretty/secret_test.go | 2 -- yaml/pretty/signature.go | 18 +++++++++++----- yaml/pretty/signature_test.go | 2 -- yaml/pretty/util.go | 18 +++++++++++----- yaml/pretty/util_test.go | 18 +++++++++++----- yaml/pretty/writer.go | 18 +++++++++++----- yaml/pretty/writer_test.go | 18 +++++++++++----- yaml/unit.go | 10 +++++---- yaml/unit_test.go | 17 ++++++++++++--- 27 files changed, 203 insertions(+), 119 deletions(-) delete mode 100644 yaml/pretty/pretty_oss.go diff --git a/LICENSE b/LICENSE index d189f46..b0d7c8c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,10 +1,14 @@ Copyright 2019 Drone.IO, Inc. -Source code in this repository is variously licensed under the -Apache License Version 2.0, an Apache compatible license, or the -Drone Non-Commercial License. Source code in a given file is -licensed under the Drone Community License unless otherwise noted -at the beginning of the file. +The Drone Community Edition is licensed under the Apache License, +Version 2.0 (the "Apache License"). You may obtain a copy of the +Apache License at + + http://www.apache.org/licenses/LICENSE-2.0 + +The Drone Enterprise Edition is licensed under the Drone +Non-Commercial License (the "Non-Commercial License"). A copy of +the Non-Commercial License is provided below. ----------------------------------------------------------------- diff --git a/main.go b/main.go index 54bdba7..819f201 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package main diff --git a/yaml/compiler/convert.go b/yaml/compiler/convert.go index 4a12117..6c2ae9c 100644 --- a/yaml/compiler/convert.go +++ b/yaml/compiler/convert.go @@ -1,4 +1,4 @@ -// Copyright 2019 Drone IO, Inc. +// Copyright the Drone Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/yaml/compiler/transform/limits.go b/yaml/compiler/transform/limits.go index 18d4a66..a012298 100644 --- a/yaml/compiler/transform/limits.go +++ b/yaml/compiler/transform/limits.go @@ -1,4 +1,5 @@ -// Copyright 2019 Drone IO, Inc. +// Copyright Jesse Haka. +// Copyright the Drone Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/yaml/compiler/transform/limits_test.go b/yaml/compiler/transform/limits_test.go index 59ad324..7430d7c 100644 --- a/yaml/compiler/transform/limits_test.go +++ b/yaml/compiler/transform/limits_test.go @@ -1,6 +1,17 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. +// Copyright Jesse Haka. +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package transform diff --git a/yaml/pipeline.go b/yaml/pipeline.go index 4c6fed3..483c8ce 100644 --- a/yaml/pipeline.go +++ b/yaml/pipeline.go @@ -1,4 +1,4 @@ -// Copyright 2019 Drone IO, Inc. +// Copyright the Drone Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/yaml/pretty/container.go b/yaml/pretty/container.go index def83cb..a2c7a7a 100644 --- a/yaml/pretty/container.go +++ b/yaml/pretty/container.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/container_test.go b/yaml/pretty/container_test.go index 431da00..742b200 100644 --- a/yaml/pretty/container_test.go +++ b/yaml/pretty/container_test.go @@ -2,6 +2,4 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty diff --git a/yaml/pretty/cron.go b/yaml/pretty/cron.go index 4722065..6a835d2 100644 --- a/yaml/pretty/cron.go +++ b/yaml/pretty/cron.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/cron_test.go b/yaml/pretty/cron_test.go index 1de6cb9..ecd36f2 100644 --- a/yaml/pretty/cron_test.go +++ b/yaml/pretty/cron_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import "testing" diff --git a/yaml/pretty/pipeline.go b/yaml/pretty/pipeline.go index 1bb7d4e..dcd97fa 100644 --- a/yaml/pretty/pipeline.go +++ b/yaml/pretty/pipeline.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/pipeline_test.go b/yaml/pretty/pipeline_test.go index f60b3ad..eb6dc1f 100644 --- a/yaml/pretty/pipeline_test.go +++ b/yaml/pretty/pipeline_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import "testing" diff --git a/yaml/pretty/pretty.go b/yaml/pretty/pretty.go index 9997769..ff2390f 100644 --- a/yaml/pretty/pretty.go +++ b/yaml/pretty/pretty.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/pretty_oss.go b/yaml/pretty/pretty_oss.go deleted file mode 100644 index e081fa6..0000000 --- a/yaml/pretty/pretty_oss.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2019 Drone IO, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build oss - -package pretty - -import ( - "io" - - "github.com/drone/drone-yaml/yaml" -) - -// Print pretty prints the manifest. -func Print(w io.Writer, v *yaml.Manifest) { - d, _ := v.Encode() - w.Write(d) -} diff --git a/yaml/pretty/pretty_test.go b/yaml/pretty/pretty_test.go index 3b52f3d..e5b222c 100644 --- a/yaml/pretty/pretty_test.go +++ b/yaml/pretty/pretty_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import ( diff --git a/yaml/pretty/registry.go b/yaml/pretty/registry.go index 773b215..4089bc4 100644 --- a/yaml/pretty/registry.go +++ b/yaml/pretty/registry.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/registry_test.go b/yaml/pretty/registry_test.go index 5375968..d608b1d 100644 --- a/yaml/pretty/registry_test.go +++ b/yaml/pretty/registry_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import "testing" diff --git a/yaml/pretty/secret.go b/yaml/pretty/secret.go index e42745e..cba0d78 100644 --- a/yaml/pretty/secret.go +++ b/yaml/pretty/secret.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/secret_test.go b/yaml/pretty/secret_test.go index cf3e2e8..fa7508b 100644 --- a/yaml/pretty/secret_test.go +++ b/yaml/pretty/secret_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import "testing" diff --git a/yaml/pretty/signature.go b/yaml/pretty/signature.go index ec6172c..ac1e736 100644 --- a/yaml/pretty/signature.go +++ b/yaml/pretty/signature.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright 2019 Drone IO, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/signature_test.go b/yaml/pretty/signature_test.go index 2b23045..01e4498 100644 --- a/yaml/pretty/signature_test.go +++ b/yaml/pretty/signature_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by the Drone Non-Commercial License // that can be found in the LICENSE file. -// +build !oss - package pretty import "testing" diff --git a/yaml/pretty/util.go b/yaml/pretty/util.go index f4902d0..9441f87 100644 --- a/yaml/pretty/util.go +++ b/yaml/pretty/util.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/util_test.go b/yaml/pretty/util_test.go index 0f860ba..e202aaf 100644 --- a/yaml/pretty/util_test.go +++ b/yaml/pretty/util_test.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/writer.go b/yaml/pretty/writer.go index d1d09c9..11cc8ff 100644 --- a/yaml/pretty/writer.go +++ b/yaml/pretty/writer.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/pretty/writer_test.go b/yaml/pretty/writer_test.go index c07ce0a..cbb89de 100644 --- a/yaml/pretty/writer_test.go +++ b/yaml/pretty/writer_test.go @@ -1,8 +1,16 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. - -// +build !oss +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package pretty diff --git a/yaml/unit.go b/yaml/unit.go index cdb4a37..84b43c6 100644 --- a/yaml/unit.go +++ b/yaml/unit.go @@ -1,11 +1,12 @@ -// Copyright 2019 Drone IO, Inc. -// +// Copyright Jesse Haka. +// Copyright the Drone Authors. +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,6 +21,7 @@ import ( "github.com/docker/go-units" ) + // BytesSize stores a human-readable size in bytes, // kibibytes, mebibytes, gibibytes, or tebibytes // (eg. "44kiB", "17MiB"). diff --git a/yaml/unit_test.go b/yaml/unit_test.go index fd67cff..0e600aa 100644 --- a/yaml/unit_test.go +++ b/yaml/unit_test.go @@ -1,6 +1,17 @@ -// Copyright 2019 Drone.IO Inc. All rights reserved. -// Use of this source code is governed by the Drone Non-Commercial License -// that can be found in the LICENSE file. +// Copyright Jesse Haka. +// Copyright the Drone Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package yaml