From 53d6531078a89982209a575fd4644bbdf7c0ba2f Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 13 Apr 2023 10:22:08 +0800 Subject: [PATCH 1/4] pull in validation update Signed-off-by: Stephanie --- go.mod | 2 +- go.sum | 2 ++ .../data/v2/2.2.0/devfileJsonSchema220.go | 21 +++---------------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index f0d97a0f..4bf4f5e0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/devfile/library/v2 go 1.18 require ( - github.com/devfile/api/v2 v2.2.0 + github.com/devfile/api/v2 v2.2.1-alpha.0.20230413012049-a6c32fca0dbd github.com/devfile/registry-support/registry-library v0.0.0-20221018213054-47b3ffaeadba github.com/fatih/color v1.7.0 github.com/fsnotify/fsnotify v1.6.0 diff --git a/go.sum b/go.sum index 7f14589e..563a24a1 100644 --- a/go.sum +++ b/go.sum @@ -291,6 +291,8 @@ github.com/devfile/api/v2 v2.0.0-20211021164004-dabee4e633ed/go.mod h1:d99eTN6Qx github.com/devfile/api/v2 v2.0.0-20220117162434-6e6e6a8bc14c/go.mod h1:d99eTN6QxgzihOOFyOZA+VpUyD4Q1pYRYHZ/ci9J96Q= github.com/devfile/api/v2 v2.2.0 h1:3Mwl/dtT508oU4pNt/v4G8vqvjoZqi9LOInXCNwKMoc= github.com/devfile/api/v2 v2.2.0/go.mod h1:dN7xFrOVG+iPqn4UKGibXLd5oVsdE8XyK9OEb5JL3aI= +github.com/devfile/api/v2 v2.2.1-alpha.0.20230413012049-a6c32fca0dbd h1:HpGR728CfB6BB9ZuFtQb0UeTIYNFgpuGsuoMOJNMUTM= +github.com/devfile/api/v2 v2.2.1-alpha.0.20230413012049-a6c32fca0dbd/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= github.com/devfile/library v1.2.1-0.20211104222135-49d635cb492f/go.mod h1:uFZZdTuRqA68FVe/JoJHP92CgINyQkyWnM2Qyiim+50= github.com/devfile/library v1.2.1-0.20220308191614-f0f7e11b17de/go.mod h1:GSPfJaBg0+bBjBHbwBE5aerJLH6tWGQu2q2rHYd9czM= github.com/devfile/library/v2 v2.0.1/go.mod h1:paJ0PARAVy0br13VpBEQ4fO3rZVDxWtooQ29+23PNBk= diff --git a/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go b/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go index f485c744..4c93e3ca 100644 --- a/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go +++ b/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go @@ -1,25 +1,10 @@ -// -// Copyright 2022 Red Hat, 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 version220 // https://raw.githubusercontent.com/devfile/api/main/schemas/latest/devfile.json const JsonSchema220 = `{ "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.", "type": "object", - "title": "Devfile schema - Version 2.2.0-alpha", + "title": "Devfile schema - Version 2.2.1-alpha", "required": [ "schemaVersion" ], @@ -212,7 +197,7 @@ const JsonSchema220 = `{ "additionalProperties": false }, "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to 'true' the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is 'false'", + "description": "Specify whether the command is restarted or not when the source code changes. If set to 'true' the command won't be restarted. A *hotReloadCapable* 'run' or 'debug' command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* 'build' command is expected to be executed only once and won't be executed again. This field is taken into account only for commands 'build', 'run' and 'debug' with 'isDefault' set to 'true'.\n\nDefault value is 'false'", "type": "boolean" }, "label": { @@ -1104,7 +1089,7 @@ const JsonSchema220 = `{ "additionalProperties": false }, "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to 'true' the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is 'false'", + "description": "Specify whether the command is restarted or not when the source code changes. If set to 'true' the command won't be restarted. A *hotReloadCapable* 'run' or 'debug' command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* 'build' command is expected to be executed only once and won't be executed again. This field is taken into account only for commands 'build', 'run' and 'debug' with 'isDefault' set to 'true'.\n\nDefault value is 'false'", "type": "boolean" }, "label": { From 38870a0c72a21c1146c932779cdc652b5ae9c2fc Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 13 Apr 2023 23:11:59 +0800 Subject: [PATCH 2/4] run go mod tidy Signed-off-by: Stephanie --- go.sum | 1 - 1 file changed, 1 deletion(-) diff --git a/go.sum b/go.sum index 563a24a1..5dde8b32 100644 --- a/go.sum +++ b/go.sum @@ -289,7 +289,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devfile/api/v2 v2.0.0-20211021164004-dabee4e633ed/go.mod h1:d99eTN6QxgzihOOFyOZA+VpUyD4Q1pYRYHZ/ci9J96Q= github.com/devfile/api/v2 v2.0.0-20220117162434-6e6e6a8bc14c/go.mod h1:d99eTN6QxgzihOOFyOZA+VpUyD4Q1pYRYHZ/ci9J96Q= -github.com/devfile/api/v2 v2.2.0 h1:3Mwl/dtT508oU4pNt/v4G8vqvjoZqi9LOInXCNwKMoc= github.com/devfile/api/v2 v2.2.0/go.mod h1:dN7xFrOVG+iPqn4UKGibXLd5oVsdE8XyK9OEb5JL3aI= github.com/devfile/api/v2 v2.2.1-alpha.0.20230413012049-a6c32fca0dbd h1:HpGR728CfB6BB9ZuFtQb0UeTIYNFgpuGsuoMOJNMUTM= github.com/devfile/api/v2 v2.2.1-alpha.0.20230413012049-a6c32fca0dbd/go.mod h1:qp8jcw12y1JdCsxjK/7LJ7uWaJOxcY1s2LUk5PhbkbM= From d8c3311385745213deae08922d0964e5f8e7ac54 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 13 Apr 2023 23:16:57 +0800 Subject: [PATCH 3/4] add license header Signed-off-by: Stephanie --- license_header.txt | 2 +- .../parser/data/v2/2.2.0/devfileJsonSchema220.go | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/license_header.txt b/license_header.txt index 8380e327..9dfeb647 100644 --- a/license_header.txt +++ b/license_header.txt @@ -1,5 +1,5 @@ -Copyright 2022 Red Hat, Inc. +Copyright 2022-2023 Red Hat, Inc. 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/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go b/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go index 4c93e3ca..10d531e8 100644 --- a/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go +++ b/pkg/devfile/parser/data/v2/2.2.0/devfileJsonSchema220.go @@ -1,3 +1,18 @@ +// +// Copyright 2022-2023 Red Hat, 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 version220 // https://raw.githubusercontent.com/devfile/api/main/schemas/latest/devfile.json From 70a8a32a27bea7075c7c81f5ea3b39e76b95ed70 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 13 Apr 2023 23:50:56 +0800 Subject: [PATCH 4/4] update the license header to 2023 Signed-off-by: Stephanie --- license_header.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/license_header.txt b/license_header.txt index 9dfeb647..ce302f4a 100644 --- a/license_header.txt +++ b/license_header.txt @@ -1,5 +1,5 @@ -Copyright 2022-2023 Red Hat, Inc. +Copyright 2023 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.