diff --git a/CHANGELOG.md b/CHANGELOG.md index 73519757..2fd8fd91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ This document describes changes between versions of rbxmk. The `imperative` branch is the latest unreleased version. ## imperative +**Fixes:** +- Fix fragments failing to resolve due to case-sensitivity. + See a [comparison with the previous version][cmp-imperative] for a thorough list of changes. The [Documentation page][doc-imperative] provides a complete reference for this version of rbxmk. diff --git a/rbxmk/cmd.go b/rbxmk/cmd.go index 61c44cd3..9a02c505 100644 --- a/rbxmk/cmd.go +++ b/rbxmk/cmd.go @@ -9,9 +9,9 @@ import ( func DocumentCommands() { for _, def := range Program.List() { Program.SetDoc(def.Name, snek.Doc{ - Summary: Doc("Commands/" + def.Name + ":Summary"), - Arguments: Doc("Commands/" + def.Name + ":Arguments"), - Description: Doc("Commands/" + def.Name + ":Description"), + Summary: Doc("commands/" + def.Name + ":Summary"), + Arguments: Doc("commands/" + def.Name + ":Arguments"), + Description: Doc("commands/" + def.Name + ":Description"), }) if def, ok := def.New().(snek.FlagSetter); ok { def.SetFlags(flag.NewFlagSet("", 0)) diff --git a/rbxmk/cmd_download-asset.go b/rbxmk/cmd_download-asset.go index c0312c72..2eb72705 100644 --- a/rbxmk/cmd_download-asset.go +++ b/rbxmk/cmd_download-asset.go @@ -27,9 +27,9 @@ type DownloadAssetCommand struct { func (c *DownloadAssetCommand) SetFlags(flags snek.FlagSet) { SetCookieFlags(&c.Cookies, flags) - flags.Int64Var(&c.ID, "id", 0, Doc("Commands/download-asset:Flags/id")) - flags.StringVar(&c.AssetFormat, "format", "bin", Doc("Commands/download-asset:Flags/format")) - flags.StringVar(&c.FileFormat, "file-format", "", Doc("Commands/download-asset:Flags/file-format")) + flags.Int64Var(&c.ID, "id", 0, Doc("commands/download-asset:Flags/id")) + flags.StringVar(&c.AssetFormat, "format", "bin", Doc("commands/download-asset:Flags/format")) + flags.StringVar(&c.FileFormat, "file-format", "", Doc("commands/download-asset:Flags/file-format")) } func (c *DownloadAssetCommand) Run(opt snek.Options) error { diff --git a/rbxmk/cmd_upload-asset.go b/rbxmk/cmd_upload-asset.go index 809a323d..c3a7266a 100644 --- a/rbxmk/cmd_upload-asset.go +++ b/rbxmk/cmd_upload-asset.go @@ -27,9 +27,9 @@ type UploadAssetCommand struct { func (c *UploadAssetCommand) SetFlags(flags snek.FlagSet) { SetCookieFlags(&c.Cookies, flags) - flags.Int64Var(&c.ID, "id", 0, Doc("Commands/upload-asset:Flags/id")) - flags.StringVar(&c.AssetFormat, "format", "bin", Doc("Commands/upload-asset:Flags/format")) - flags.StringVar(&c.FileFormat, "file-format", "", Doc("Commands/upload-asset:Flags/file-format")) + flags.Int64Var(&c.ID, "id", 0, Doc("commands/upload-asset:Flags/id")) + flags.StringVar(&c.AssetFormat, "format", "bin", Doc("commands/upload-asset:Flags/format")) + flags.StringVar(&c.FileFormat, "file-format", "", Doc("commands/upload-asset:Flags/file-format")) } func (c *UploadAssetCommand) Run(opt snek.Options) error { diff --git a/rbxmk/cookies.go b/rbxmk/cookies.go index f1d9ad4a..f06928f2 100644 --- a/rbxmk/cookies.go +++ b/rbxmk/cookies.go @@ -10,7 +10,7 @@ import ( ) func SetCookieFlags(c *rtypes.Cookies, flags snek.FlagSet) { - flags.Func("cookies-from", Doc("Flags/cookies:cookies-from"), func(v string) error { + flags.Func("cookies-from", Doc("flags/cookies:cookies-from"), func(v string) error { cookies, err := rbxmk.CookiesFrom(v) if err != nil { return err @@ -18,7 +18,7 @@ func SetCookieFlags(c *rtypes.Cookies, flags snek.FlagSet) { *c = append(*c, cookies...) return nil }) - flags.Func("cookies-file", Doc("Flags/cookies:cookies-file"), func(v string) error { + flags.Func("cookies-file", Doc("flags/cookies:cookies-file"), func(v string) error { f, err := os.Open(v) if err != nil { return err @@ -31,7 +31,7 @@ func SetCookieFlags(c *rtypes.Cookies, flags snek.FlagSet) { *c = append(*c, cookies...) return nil }) - flags.Func("cookie-var", Doc("Flags/cookies:cookie-var"), func(v string) error { + flags.Func("cookie-var", Doc("flags/cookies:cookie-var"), func(v string) error { content := os.Getenv(v) cookies, err := rbxmk.DecodeCookies(strings.NewReader(content)) if err != nil { diff --git a/rbxmk/desc.go b/rbxmk/desc.go index d303be33..46875eae 100644 --- a/rbxmk/desc.go +++ b/rbxmk/desc.go @@ -113,12 +113,12 @@ func (d DescFlags) Resolve(client *rbxmk.Client) (desc *rtypes.RootDesc, err err } func (d *DescFlags) SetFlags(flags snek.FlagSet) { - flags.BoolVar(&d.Latest, "desc-latest", false, Doc("Flags/desc:desc-latest")) - flags.Func("desc-file", Doc("Flags/desc:desc-file"), func(v string) error { + flags.BoolVar(&d.Latest, "desc-latest", false, Doc("flags/desc:desc-latest")) + flags.Func("desc-file", Doc("flags/desc:desc-file"), func(v string) error { d.Files = append(d.Files, v) return nil }) - flags.Func("desc-patch", Doc("Flags/desc:desc-patch"), func(v string) error { + flags.Func("desc-patch", Doc("flags/desc:desc-patch"), func(v string) error { d.Patches = append(d.Patches, v) return nil }) diff --git a/rbxmk/main.go b/rbxmk/main.go index 12cb0b17..f673925f 100644 --- a/rbxmk/main.go +++ b/rbxmk/main.go @@ -6,7 +6,7 @@ import ( "github.com/anaminus/snek" ) -var Program = snek.NewProgram("rbxmk", os.Args).Usage(Doc("Commands/main")) +var Program = snek.NewProgram("rbxmk", os.Args).Usage(Doc("commands/main")) func main() { DocumentCommands() diff --git a/rbxmk/world.go b/rbxmk/world.go index abf15f42..53f4139c 100644 --- a/rbxmk/world.go +++ b/rbxmk/world.go @@ -41,10 +41,10 @@ type WorldFlags struct { } func (f *WorldFlags) SetFlags(flags snek.FlagSet) { - flags.Var((*repeatedString)(&f.IncludedRoots), "include-root", Doc("Flags/world:include-root")) - flags.Var((*repeatedString)(&f.Libraries), "libraries", Doc("Flags/world:libraries")) - flags.BoolVar(&f.InsecurePaths, "allow-insecure-paths", false, Doc("Flags/world:allow-insecure-paths")) - flags.BoolVar(&f.Debug, "debug", false, Doc("Flags/world:debug")) + flags.Var((*repeatedString)(&f.IncludedRoots), "include-root", Doc("flags/world:include-root")) + flags.Var((*repeatedString)(&f.Libraries), "libraries", Doc("flags/world:libraries")) + flags.BoolVar(&f.InsecurePaths, "allow-insecure-paths", false, Doc("flags/world:allow-insecure-paths")) + flags.BoolVar(&f.Debug, "debug", false, Doc("flags/world:debug")) } // WorldOpt are options to InitWorld.