Skip to content

Commit

Permalink
Merge pull request #3 from losisin/first-release
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
losisin committed Oct 24, 2023
2 parents 4710f72 + e77e6ec commit 0831469
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ archives:
format: tar.gz
files:
- LICENSE
- README.md
- plugin.yaml

checksum:
Expand Down
2 changes: 1 addition & 1 deletion LICENCE → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 5 additions & 4 deletions install-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -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"
update: "cd $HELM_PLUGIN_DIR; HELM_PLUGIN_UPDATE=1 ./install-binary.sh"

0 comments on commit 0831469

Please sign in to comment.