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: diff --git a/LICENCE b/LICENSE similarity index 98% rename from LICENCE rename to LICENSE index 1507d76..03abd56 100644 --- a/LICENCE +++ 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/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: 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..11dd3f9 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,9 +1,9 @@ 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 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"