Skip to content

Commit

Permalink
Merge pull request #463 from Unpackerr/dn2_rename
Browse files Browse the repository at this point in the history
rename some files
  • Loading branch information
davidnewhall authored Jul 17, 2024
2 parents 16ef713 + c156a9d commit 05da8b0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion init/config/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unpackerr Configuration Generator

This folder contains a [yaml](conf-builder.yml) file that describes the entire Unpackerr configuration.
This folder contains a [yaml](definitions.yml) file that describes the entire Unpackerr configuration.
This description includes all variables, their defaults, their recommendations, comments and documentation.

## Builders
Expand Down
2 changes: 2 additions & 0 deletions init/config/compose-builder.go → init/config/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"strings"
)

/* This file creates an example compose file: docker-compose.yml */

//nolint:lll
const (
space = " "
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions init/config/docs-builder.go → init/config/docusaurus.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
"github.com/BurntSushi/toml"
)

/* This file creates a folder full of docusaurus markdown files for https://unpackerr.zip */

func printDocusaurus(config *Config, output string) {
// Generate index file first.
if err := makeGenerated(config, output); err != nil {
Expand Down
10 changes: 5 additions & 5 deletions init/config/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run . --config ../../examples/unpackerr.conf.example --compose ../../examples/docker-compose.yml --type config,compose --file conf-builder.yml
//go:generate go run . --config ../../examples/unpackerr.conf.example --compose ../../examples/docker-compose.yml --type config,compose --file definitions.yml

package main

Expand Down Expand Up @@ -27,7 +27,7 @@ const (
opTimeout = 6 * time.Second
)

//go:embed conf-builder.yml
//go:embed definitions.yml
var confBuilder []byte

type section string
Expand Down Expand Up @@ -88,7 +88,7 @@ func main() {
defer file.Close()

config := &Config{}
// Decode conf-builder file into Go data structure.
// Decode definitions file into Go data structure.
if err = yaml.NewDecoder(file).Decode(config); err != nil {
log.Fatalln(err) //nolint:gocritic
}
Expand Down Expand Up @@ -127,9 +127,9 @@ func parseFlags() *flags {
flag.StringVar(&flags.Compose, "compose", exampleCompose,
"Choose a filename for the generated docker compose service.")
flag.StringVar(&flags.Docs, "docs", outputDir,
"Choose folder for generated documentation. ")
"Choose folder for generated documentation.")
flag.StringVarP(&flags.File, "file", "f", "internal",
"URL or filepath for conf-builder.yml, internal uses the compiled-in file")
"URL or filepath for definitions.yml, 'internal' uses the compiled-in file.")
flag.Parse()

return &flags
Expand Down

0 comments on commit 05da8b0

Please sign in to comment.