Skip to content

Commit 77b8270

Browse files
committed
Release 0.1.5
1 parent 9b6b5da commit 77b8270

File tree

14 files changed

+110
-472
lines changed

14 files changed

+110
-472
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
custom: https://aceberg.github.io/MyDocs/sponsor
3+
custom: ['https://boosty.to/aceberg/donate', 'https://github.com/aceberg#donate']

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION=0.1.4
1+
VERSION=0.1.5

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# Change Log
33
All notable changes to this project will be documented in this file.
44

5+
## [0.1.5] - 2024-09-20
6+
### Added
7+
- Theme `dark` and `light` option
8+
- Local Node modules option
9+
510
## [0.1.4] - 2023-05-20
611
### Changed
712
- Log page update

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fmt:
1515
go fmt ./...
1616

1717
lint:
18-
# golangci-lint run
18+
golangci-lint run
1919
golint ./...
2020

2121
check: fmt lint

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ You can do all configuration through web interface. Config files paths are liste
9090
```
9191
`config.yaml` example:
9292
```yaml
93+
color: light
9394
host: 0.0.0.0
95+
nodepath: ""
9496
port: "8844"
9597
theme: cosmo
9698
```
@@ -103,6 +105,7 @@ theme: cosmo
103105
| -------- | ----------- | ------- | --- | --- |
104106
| -c | Path to GUI config file |./config.yaml| $HOME/.config/git-syr/config.yaml | /etc/git-syr/config.yaml |
105107
| -l | Path to log file | ./git-syr.log | $HOME/.config/git-syr/git-syr.log | /var/log/git-syr.log |
108+
| -n | Path to [local node modules](https://github.com/aceberg/my-dockerfiles/tree/main/node-bootstrap) | | | |
106109
| -r | Path to repos yaml file |./repos.yaml| $HOME/.config/git-syr/repos.yaml | /etc/git-syr/repos.yaml |
107110
| -w | Launch without web gui | false | | |
108111

cmd/git-syr/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ import (
1414
const confPath = "config.yaml"
1515
const yamlPath = "repos.yaml"
1616
const logPath = "git-syr.log"
17+
const nodePath = ""
1718

1819
func main() {
1920
confPtr := flag.String("c", confPath, "Path to config yaml file")
2021
logPtr := flag.String("l", logPath, "Path to log file")
22+
nodePtr := flag.String("n", nodePath, "Path to local node modules")
2123
yamlPtr := flag.String("r", yamlPath, "Path to repos yaml file")
2224
webPtr := flag.Bool("w", false, "Launch without web gui")
2325
flag.Parse()
@@ -32,6 +34,6 @@ func main() {
3234
if *webPtr {
3335
cli.Start(*yamlPtr)
3436
} else {
35-
web.Gui(*confPtr, *yamlPtr, *logPtr)
37+
web.Gui(*confPtr, *yamlPtr, *logPtr, *nodePtr)
3638
}
3739
}

go.mod

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
module github.com/aceberg/git-syr
22

3-
go 1.20
3+
go 1.23.1
44

55
require (
6-
github.com/spf13/viper v1.15.0
6+
github.com/spf13/viper v1.19.0
77
gopkg.in/yaml.v3 v3.0.1
88
)
99

1010
require (
11-
github.com/fsnotify/fsnotify v1.6.0 // indirect
11+
github.com/fsnotify/fsnotify v1.7.0 // indirect
1212
github.com/hashicorp/hcl v1.0.0 // indirect
1313
github.com/magiconair/properties v1.8.7 // indirect
1414
github.com/mitchellh/mapstructure v1.5.0 // indirect
15-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
16-
github.com/spf13/afero v1.9.3 // indirect
17-
github.com/spf13/cast v1.5.0 // indirect
18-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
15+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
16+
github.com/sagikazarmark/locafero v0.4.0 // indirect
17+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
18+
github.com/sourcegraph/conc v0.3.0 // indirect
19+
github.com/spf13/afero v1.11.0 // indirect
20+
github.com/spf13/cast v1.6.0 // indirect
1921
github.com/spf13/pflag v1.0.5 // indirect
20-
github.com/subosito/gotenv v1.4.2 // indirect
21-
golang.org/x/sys v0.3.0 // indirect
22-
golang.org/x/text v0.5.0 // indirect
22+
github.com/subosito/gotenv v1.6.0 // indirect
23+
go.uber.org/atomic v1.9.0 // indirect
24+
go.uber.org/multierr v1.9.0 // indirect
25+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
26+
golang.org/x/sys v0.18.0 // indirect
27+
golang.org/x/text v0.14.0 // indirect
2328
gopkg.in/ini.v1 v1.67.0 // indirect
2429
)

go.sum

Lines changed: 47 additions & 453 deletions
Large diffs are not rendered by default.

internal/conf/getconfig.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ func Get(path string) models.Conf {
1414
viper.SetDefault("HOST", "0.0.0.0")
1515
viper.SetDefault("PORT", "8844")
1616
viper.SetDefault("THEME", "journal")
17+
viper.SetDefault("THEME", "light")
18+
viper.SetDefault("NODEPATH", "")
1719

1820
viper.SetConfigFile(path)
1921
viper.SetConfigType("yaml")
@@ -25,6 +27,8 @@ func Get(path string) models.Conf {
2527
config.Host, _ = viper.Get("HOST").(string)
2628
config.Port, _ = viper.Get("PORT").(string)
2729
config.Theme, _ = viper.Get("THEME").(string)
30+
config.Color, _ = viper.Get("COLOR").(string)
31+
config.NodePath, _ = viper.Get("NODEPATH").(string)
2832

2933
return config
3034
}
@@ -38,6 +42,8 @@ func Write(path string, config models.Conf) {
3842
viper.Set("host", config.Host)
3943
viper.Set("port", config.Port)
4044
viper.Set("theme", config.Theme)
45+
viper.Set("color", config.Color)
46+
viper.Set("nodepath", config.NodePath)
4147

4248
err := viper.WriteConfig()
4349
check.IfError(err)

internal/models/models.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ type Conf struct {
55
Host string
66
Port string
77
Theme string
8+
Color string
89
Icon string
910
ConfPath string
1011
YamlPath string
1112
LogPath string
13+
NodePath string
1214
Quit chan bool
1315
}
1416

0 commit comments

Comments
 (0)