Skip to content

Commit

Permalink
Fixed loading templates if dev is set to false, increased fs provider…
Browse files Browse the repository at this point in the history
… reload timer.
  • Loading branch information
Kugelschieber committed May 29, 2024
1 parent e132d3a commit 965757b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

## 0.1.1
## 0.3.0

* fixed loading templates if dev is set to false
* increased fs provider reload timer

## 0.2.0

* fixed lower case paths

Expand Down
4 changes: 3 additions & 1 deletion pkg/source/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type FS struct {
// NewFS creates a new Provider for the file system.
func NewFS(dir string, updateSeconds int) *FS {
if updateSeconds == 0 {
updateSeconds = 15
updateSeconds = 60
}

return &FS{
Expand Down Expand Up @@ -47,6 +47,8 @@ func (provider *FS) Update(ctx context.Context, update func()) {
}
}
}()

update()
}

// LastUpdate implements the Provider interface.
Expand Down
2 changes: 2 additions & 0 deletions pkg/source/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func (provider *Git) Update(ctx context.Context, update func()) {
}
}()
}

update()
}

// LastUpdate implements the Provider interface.
Expand Down
2 changes: 1 addition & 1 deletion pkg/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pkg

const (
version = "0.2.0"
version = "0.3.0"
)

// Version returns the Shifu version number.
Expand Down

0 comments on commit 965757b

Please sign in to comment.