Skip to content

Commit

Permalink
Pre release (#1)
Browse files Browse the repository at this point in the history
* Prerelease option added

Signed-off-by: Manish Gupta <manish@plane.so>

* updated Help content and test case

Signed-off-by: Manish Gupta <manish@plane.so>

* added folder creation as per pages-index-path

Signed-off-by: Manish Gupta <manish@plane.so>

---------

Signed-off-by: Manish Gupta <manish@plane.so>
  • Loading branch information
mguptahub authored Sep 9, 2024
1 parent 78776d9 commit 25af656
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/releaser/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ func (r *Releaser) UpdateIndexFile() (bool, error) {
// if pages-index-path doesn't end with index.yaml we can try and fix it
if filepath.Base(r.config.PagesIndexPath) != "index.yaml" {
// if path is a directory then add index.yaml
if stat, err := os.Stat(filepath.Join(worktree, r.config.PagesIndexPath)); err == nil && stat.IsDir() {
if err := os.MkdirAll(filepath.Join(worktree, r.config.PagesIndexPath), 0755); err == nil {
r.config.PagesIndexPath = filepath.Join(r.config.PagesIndexPath, "index.yaml")
// otherwise error out
} else {
fmt.Printf("pages-index-path (%s) should be a directory or a file called index.yaml\n", r.config.PagesIndexPath)
os.Exit(1) // nolint: gocritic
Expand Down

0 comments on commit 25af656

Please sign in to comment.