From 0a0d189b0c29740caa2edeff2c43cbe14d089cf0 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Fri, 6 Dec 2024 14:03:17 +0100 Subject: [PATCH 1/2] fix: make tags optional --- cmd/init.go | 4 +--- cmd/install.go | 6 ++---- ownbrew.schema.json | 3 +-- pkg/cmd/config.go | 2 +- pkg/config/package.go | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index 126eb8f..db0718a 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -32,7 +32,7 @@ packages: ` // NewInit represents the init command -func NewInit(root *cobra.Command) *cobra.Command { +func NewInit(root *cobra.Command) { cmd := &cobra.Command{ Use: "init", Short: "Init ownbrew", @@ -54,6 +54,4 @@ func NewInit(root *cobra.Command) *cobra.Command { } root.AddCommand(cmd) - - return cmd } diff --git a/cmd/install.go b/cmd/install.go index 6bfea04..6ff77cf 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -8,7 +8,7 @@ import ( ) // NewInstall represents the install command -func NewInstall(root *cobra.Command) *cobra.Command { +func NewInstall(root *cobra.Command) { cmd := &cobra.Command{ Use: "install", Short: "Install dependencies", @@ -50,9 +50,7 @@ func NewInstall(root *cobra.Command) *cobra.Command { } cmd.Flags().Bool("dry", false, "print out the taps that will be installed") - cmd.Flags().StringSlice("tags", nil, "filter by tags (e.g. ci,-test") + cmd.Flags().StringSlice("tags", nil, "filter by tags (e.g. ci,-test)") root.AddCommand(cmd) - - return cmd } diff --git a/ownbrew.schema.json b/ownbrew.schema.json index bae50a5..380aa94 100644 --- a/ownbrew.schema.json +++ b/ownbrew.schema.json @@ -80,8 +80,7 @@ "type": "object", "required": [ "tap", - "version", - "tags" + "version" ] } } diff --git a/pkg/cmd/config.go b/pkg/cmd/config.go index 1c4b0c5..f89ee88 100644 --- a/pkg/cmd/config.go +++ b/pkg/cmd/config.go @@ -25,7 +25,7 @@ func InitConfig() { viper.SetConfigFile(filename) return } - // Search config in home directory with name ".sesamy" (without extension). + // Search config in home directory with name ".ownbrew" (without extension). viper.AddConfigPath(".") viper.SetConfigName("ownbrew") } diff --git a/pkg/config/package.go b/pkg/config/package.go index 7f0500a..6f48c18 100644 --- a/pkg/config/package.go +++ b/pkg/config/package.go @@ -17,7 +17,7 @@ type Package struct { // Version of the package to install Version string `json:"version" yaml:"version"` // List of tags - Tags []string `json:"tags" yaml:"tags"` + Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` } func (c Package) AllNames() []string { From a214c32f3c464961199e00dc617ece45fd30b698 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Fri, 6 Dec 2024 14:03:46 +0100 Subject: [PATCH 2/2] docs: update LICENSE --- .../CODE_OF_CONDUCT.md | 55 ++++++++++--------- LICENSE | 2 +- README.md | 2 +- 3 files changed, 32 insertions(+), 27 deletions(-) rename CODE_OF_CONDUCT.md => .github/CODE_OF_CONDUCT.md (82%) diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 82% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md index 34aabf4..06b2fcb 100644 --- a/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ + # Contributor Covenant Code of Conduct ## Our Pledge @@ -6,8 +7,8 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. @@ -22,17 +23,17 @@ community include: * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community +* Focusing on what is best not just for us as individuals, but for the overall + community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or - advances of any kind +* The use of sexualized language or imagery, and sexual attention or advances of + any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission +* Publishing others' private information, such as a physical or email address, + without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting @@ -52,7 +53,7 @@ decisions when appropriate. This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, +Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. @@ -60,7 +61,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -info@bestbytes.de. +info@bestbytes.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the @@ -82,15 +83,15 @@ behavior was inappropriate. A public apology may be requested. ### 2. Warning -**Community Impact**: A violation through a single incident or series -of actions. +**Community Impact**: A violation through a single incident or series of +actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. +like social media. Violating these terms may lead to a temporary or permanent +ban. ### 3. Temporary Ban @@ -106,23 +107,27 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. -**Consequence**: A permanent ban from any sort of public interaction within -the community. +**Consequence**: A permanent ban from any sort of public interaction within the +community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/LICENSE b/LICENSE index 8257b09..2b3a107 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -The MIT License (MIT) +MIT License Copyright (c) foomo by bestbytes diff --git a/README.md b/README.md index 890407d..cf3e59d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ $ brew install foomo/tap/ownbrew ## Configuration `.ownbrew.yaml` ```yaml -# yaml-language-server: $schema=https://raw.githubusercontent.com/foomo/ownbrew/v0.2.0/ownbrew.schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/foomo/ownbrew/v0.2.1/ownbrew.schema.json version: '1.1' binDir: "bin"