gorilla icon indicating copy to clipboard operation
gorilla copied to clipboard

Add build argument to generate catalog files

Open 1dustindavis opened this issue 5 years ago • 3 comments

This PR adds support for a new -build argument, which can be used to generate catalog files from package-info files.

package-info files are normal yaml files in a packages-info directory at the root of the repo. An example is in the examples directory.

There is also a repo_path config option to tell gorilla where the root of your repo is on disk.

Need to create wiki pages before merging

1dustindavis avatar Feb 02 '20 00:02 1dustindavis

Recently realized this is currently making catalogs that include nil values. For example, it will add values to the catalog for an uninstaller, even if one wasn't specified in the package-info file.

1dustindavis avatar Mar 25 '20 16:03 1dustindavis

Hey @1dustindavis I think I found the problem with the nil values making it in to the catalogs. There appears to be some double quotes in the wrong places in the catalog pkg. I modified lines like this:

Catalog string `yaml:"catalog",omitempty`

To instead be:

Catalog string `yaml:"catalog,omitempty"`

Once I did that, and ran a build on gorilla, the -b argument correctly procured the catalog. Try moving the double quotes on the lines with omitempty on them, and let me know what you think! Thanks!

danhutchings avatar May 12 '21 07:05 danhutchings

Good catch! There is definitely something weird there. I haven’t tested this out yet cause I got distracted trying to rebase, and there have been significant changes to main since this pr was created.

I plan to spend some time on this soon 🤞

1dustindavis avatar May 20 '21 15:05 1dustindavis