bump to 7.0

This commit is contained in:
Egor Kovetskiy 2022-01-18 12:10:46 +06:00
parent 9a7146c7d7
commit b15f1f8e70
2 changed files with 12 additions and 4 deletions

13
main.go
View File

@ -39,7 +39,7 @@ type Flags struct {
} }
const ( const (
version = "6.7" version = "7.0"
usage = `mark - a tool for updating Atlassian Confluence pages from markdown. usage = `mark - a tool for updating Atlassian Confluence pages from markdown.
Docs: https://github.com/kovetskiy/mark Docs: https://github.com/kovetskiy/mark
@ -178,7 +178,9 @@ func processFile(
switch { switch {
case meta.Space == "" && flags.Space == "": case meta.Space == "" && flags.Space == "":
log.Fatal("space is not set ('Space' header is not set and '--space' option is not set)") log.Fatal(
"space is not set ('Space' header is not set and '--space' option is not set)",
)
case meta.Space == "" && flags.Space != "": case meta.Space == "" && flags.Space != "":
meta.Space = flags.Space meta.Space = flags.Space
} }
@ -313,7 +315,12 @@ func processFile(
target = page target = page
} }
attaches, err := mark.ResolveAttachments(api, target, filepath.Dir(file), meta.Attachments) attaches, err := mark.ResolveAttachments(
api,
target,
filepath.Dir(file),
meta.Attachments,
)
if err != nil { if err != nil {
log.Fatalf(err, "unable to create/update attachments") log.Fatalf(err, "unable to create/update attachments")
} }

View File

@ -1,8 +1,9 @@
package mark package mark
import ( import (
"github.com/stretchr/testify/assert"
"testing" "testing"
"github.com/stretchr/testify/assert"
) )
var ( var (