From c61e6b2deabaf3c18ffe93659ccb327e361c1757 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Tue, 24 Oct 2023 22:08:30 +0200 Subject: [PATCH 1/5] fix wrong file name Signed-off-by: Aleksandar Stojanov --- LICENCE => LICENSE | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENCE => LICENSE (100%) diff --git a/LICENCE b/LICENSE similarity index 100% rename from LICENCE rename to LICENSE From e804e31cb8e8b50a2339ce34a78de4f2470190a0 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Tue, 24 Oct 2023 22:09:19 +0200 Subject: [PATCH 2/5] add readme to dist Signed-off-by: Aleksandar Stojanov --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6e01d44..8093477 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -29,6 +29,7 @@ archives: format: tar.gz files: - LICENSE + - README.md - plugin.yaml checksum: From c577a5d5d5bcf07c3f150978347012fe47b6c5ed Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Tue, 24 Oct 2023 22:09:34 +0200 Subject: [PATCH 3/5] fix typo in readme Signed-off-by: Aleksandar Stojanov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c165bb6..249370c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ deep: Run the following command to merge the yaml files and output json schema: ```bash -$ helm schema -input values_1.yaml,custom/path/values_2.yaml -draft 2020 -output my.schema.json +$ helm schema -input values_1.yaml,custom/path/values_2.yaml -draft 7 -output my.schema.json ``` Output will be something like this: From 147fa2983a96a26fbd67fee38f6be27a68ed6091 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Tue, 24 Oct 2023 22:11:26 +0200 Subject: [PATCH 4/5] fix small things Signed-off-by: Aleksandar Stojanov --- LICENSE | 2 +- install-binary.sh | 9 +++++---- plugin.yaml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 1507d76..03abd56 100644 --- a/LICENSE +++ b/LICENSE @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/install-binary.sh b/install-binary.sh index 0cd2144..7eecd16 100755 --- a/install-binary.sh +++ b/install-binary.sh @@ -52,7 +52,7 @@ initOS() { # verifySupported checks that the os/arch combination is supported for # binary builds. verifySupported() { - local supported="linux-arm64\nlinux-amd64\nmacos-amd64\nwindows-amd64\nmacos-arm64" + supported="linux-arm64\nlinux-amd64\nmacos-amd64\nwindows-amd64\nmacos-arm64" if ! echo "$supported" | grep -q "$OS-$ARCH"; then echo "No prebuild binary for $OS-$ARCH." exit 1 @@ -68,7 +68,7 @@ verifySupported() { # getDownloadURL checks the latest available version. getDownloadURL() { # Determine last tag based on VCS download - local version=$(git describe --tags --abbrev=0 >/dev/null 2>&1) + version=$(git describe --tags --abbrev=0 >/dev/null 2>&1) # If no version found (because of no git), try fetch from plugin if [ -z "$version" ]; then echo "No version found" @@ -87,7 +87,7 @@ downloadFile() { PLUGIN_TMP_FOLDER="/tmp/_dist/" [ -d "$PLUGIN_TMP_FOLDER" ] && rm -r "$PLUGIN_TMP_FOLDER" >/dev/null mkdir -p "$PLUGIN_TMP_FOLDER" - echo "Downloading "$DOWNLOAD_URL" to location $PLUGIN_TMP_FOLDER" + echo "Downloading $DOWNLOAD_URL to location $PLUGIN_TMP_FOLDER" if type "curl" >/dev/null 2>&1; then (cd "$PLUGIN_TMP_FOLDER" && curl -LO "$DOWNLOAD_URL") elif type "wget" >/dev/null 2>&1; then @@ -133,7 +133,7 @@ installFile() { HELM_TMP="/tmp/$PROJECT_NAME" mkdir -p "$HELM_TMP" tar xf "$DOWNLOAD_FILE" -C "$HELM_TMP" - HELM_TMP_BIN="$HELM_TMP/untt" + HELM_TMP_BIN="$HELM_TMP/schema" echo "Preparing to install into ${HELM_PLUGIN_PATH}" # Use * to also copy the file with the exe suffix on Windows cp "$HELM_TMP_BIN"* "$HELM_PLUGIN_PATH" @@ -147,6 +147,7 @@ fail_trap() { result=$? if [ "$result" != "0" ]; then echo "Failed to install $PROJECT_NAME" + printf "\tFor support, go to https://github.com/%s.\n" "$PROJECT_GH" fi exit $result } diff --git a/plugin.yaml b/plugin.yaml index 0fc2746..dd3dddf 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -6,4 +6,4 @@ ignoreFlags: false command: "$HELM_PLUGIN_DIR/schema" hooks: install: "cd $HELM_PLUGIN_DIR; ./install-binary.sh" - update: "cd $HELM_PLUGIN_DIR; HELM_PLUGIN_UPDATE=1 ./install-binary.sh" \ No newline at end of file + update: "cd $HELM_PLUGIN_DIR; HELM_PLUGIN_UPDATE=1 ./install-binary.sh" From e77e6ec021cf2a707ef8a712933bc049275e3890 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Tue, 24 Oct 2023 22:12:50 +0200 Subject: [PATCH 5/5] bump version Signed-off-by: Aleksandar Stojanov --- plugin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yaml b/plugin.yaml index dd3dddf..11dd3f9 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,5 +1,5 @@ name: "schema" -version: "0.1.0" +version: "0.1.1" usage: "generate values.schema.json from values yaml" description: "Helm plugin for generating values.schema.json from multiple values files." ignoreFlags: false