better project layout
continuous-integration/drone/push Build is passing

This commit is contained in:
Sebastian Frank committed 2019-03-19 11:15:32 +01:00
1 parent dfc932b7b0
commit 70d7497eda
128 files changed
+48 -42

No files matched your search

+2 -2
View File
@@ -1,2 +1,2 @@
test.html
html/
html/
build/dist
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
mkdir -p dist
go build -v -ldflags "-X main.Version=`git describe --tags --long` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o dist/mark2web-`cat VERSION`-${GOOS}-${GOARCH}${FILEEXT} mark2web/main.go
View File
File renamed without changes.
View File
File renamed without changes.
+11 -11
View File
@@ -15,15 +15,15 @@ steps:
commands:
- git submodule update --init --recursive
- git fetch --tags
- ./build.sh
- scripts/build.sh
when:
event: [ push, tag ]
- name: test with example content
image: alpine
commands:
- ./dist/mark2web-`cat VERSION`-linux-amd64 -version
- ./dist/mark2web-`cat VERSION`-linux-amd64 -in _example -out example_out -create -logLevel debug
- dist/mark2web-`cat build/VERSION`-linux-amd64 -version
- dist/mark2web-`cat build/VERSION`-linux-amd64 -in example -out example_out -create -logLevel debug
when:
event: [ push, tag ]
@@ -34,7 +34,7 @@ steps:
GOOS: freebsd
GOARCH: amd64
commands:
- ./build.sh
- scripts/build.sh
when:
event: [ tag ]
@@ -45,7 +45,7 @@ steps:
GOOS: darwin
GOARCH: amd64
commands:
- ./build.sh
- scripts/build.sh
when:
event: [ tag ]
@@ -57,7 +57,7 @@ steps:
GOARCH: amd64
FILEEXT: .exe
commands:
- ./build.sh
- scripts/build.sh
when:
event: [ tag ]
@@ -65,7 +65,7 @@ steps:
image: docker
commands:
- cp dist/mark2web-`cat VERSION`-linux-amd64 mark2web
- docker build -t apairon/mark2web .
- docker build -t apairon/mark2web build/package
volumes:
- name: docker
path: /var/run/docker.sock
@@ -81,7 +81,7 @@ steps:
from_secret: rsync_pass
commands:
- /mark2web -version
- /mark2web -in _website -out html -create -logLevel info
- /mark2web -in website -out html -create -logLevel info
- '
rsync -rlcgD -i -u -v --stats
--delete
@@ -110,8 +110,8 @@ steps:
base_url: https://gitbase.de
files:
- dist/*
title: VERSION
note: RELEASE.md
title: build/VERSION
note: build/RELEASE.md
checksum:
- md5
- sha256
@@ -121,4 +121,4 @@ steps:
volumes:
- name: docker
host:
path: /var/run/docker.sock
path: /var/run/docker.sock
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine
RUN apk update && apk add ca-certificates openssh-client sshpass rsync gzip && rm -r /var/cache/
ADD mark2web /
ADD ../../mark2web /
CMD ["/mark2web"]
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"os"
"path"
"gitbase.de/apairon/mark2web"
"gitbase.de/apairon/mark2web/filter"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/filter"
"gitbase.de/apairon/mark2web/pkg/helper"
"gitbase.de/apairon/mark2web/pkg/mark2web"
)
var (
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"path"
"strings"
"gitbase.de/apairon/mark2web"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/ddliu/motto"
"github.com/flosch/pongo2"
_ "github.com/robertkrimen/otto/underscore"
File renamed without changes.
@@ -12,8 +12,8 @@ import (
"strconv"
"strings"
"gitbase.de/apairon/mark2web"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/disintegration/imaging"
"github.com/flosch/pongo2"
)
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,8 @@
package filter
import (
"gitbase.de/apairon/mark2web"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/flosch/pongo2"
)
@@ -1,7 +1,7 @@
package filter
import (
"gitbase.de/apairon/mark2web"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/flosch/pongo2"
)
View File
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -1,4 +1,4 @@
package mark2web
package helper
import "fmt"
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
cpy "github.com/otiai10/copy"
)
File renamed without changes.
@@ -1,5 +1,7 @@
package mark2web
import "gitbase.de/apairon/mark2web/pkg/helper"
// CollectionConfig describes a collection
type CollectionConfig struct {
Name *string `yaml:"Name"`
@@ -21,7 +23,7 @@ type ThisPathConfig struct {
Navname *string `yaml:"Navname"`
GoTo *string `yaml:"GoTo"`
Collections []*CollectionConfig `yaml:"Collections"`
Data MapString `yaml:"Data"`
Data helper.MapString `yaml:"Data"`
}
// IndexConfig describes index input and output file
@@ -81,5 +83,5 @@ type PathConfig struct {
Markdown *MarkdownConfig `yaml:"Markdown"`
Imaging *ImagingConfig `yaml:"Imaging"`
Data MapString `yaml:"Data"`
Data helper.MapString `yaml:"Data"`
}
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"regexp"
"strings"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
cpy "github.com/otiai10/copy"
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"strings"
"time"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"github.com/davecgh/go-spew/spew"
"github.com/extemporalgenome/slug"
"github.com/flosch/pongo2"
@@ -44,7 +44,7 @@ func (node *TreeNode) handleCollections() {
}
if node.ColMap == nil {
node.ColMap = make(MapString)
node.ColMap = make(helper.MapString)
}
ctx := NewContext()
ctx["This"] = node.Config.This
@@ -239,7 +239,7 @@ func Add2Nav(currentNode *TreeNode, pathConfig *PathConfig, tplFilename, outDir
}
if dataMapKey != "" {
if newNode.Config.Data == nil {
newNode.Config.Data = make(MapString)
newNode.Config.Data = make(helper.MapString)
}
// as submap in Data
newNode.Config.Data[dataMapKey] = ctx
+1 -1
View File
@@ -1,7 +1,7 @@
package mark2web
import (
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
"github.com/flosch/pongo2"
)
+2 -2
View File
@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
)
// NavElement is one element with ist attributes and subs
@@ -14,7 +14,7 @@ type NavElement struct {
GoTo string
Active bool
ColMap MapString
ColMap helper.MapString
Data interface{}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"path"
"strings"
"gitbase.de/apairon/mark2web/helper"
"gitbase.de/apairon/mark2web/pkg/helper"
)
// ResolveNavPath fixes nav target relative to current navigation path
File renamed without changes.
+3 -1
View File
@@ -1,12 +1,14 @@
package mark2web
import "gitbase.de/apairon/mark2web/pkg/helper"
// TreeNode is complete config tree of content dir
type TreeNode struct {
InputPath string
OutputPath string
Hidden bool // for collections which are not part of the navigation
ColMap MapString
ColMap helper.MapString
InputFiles []string
OtherFiles []string
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
curdir=$(dirname $0)
distdir="$curdir/../dist"
mkdir -p "$distdir"
go build -v -ldflags "-X main.Version=`git describe --tags --long` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o "$distdir/mark2web-`cat $curdir/../build/VERSION`-${GOOS}-${GOARCH}${FILEEXT}" "$curdir/../cmd/mark2web/main.go"
View File
File renamed without changes.
View File
Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 128 files, more files were not shown because too many files have changed in this diff. Show more