~evanj/cms

299b96067f13c989c31b3cd955c622409d71e7c5 — Evan M Jones 6 months ago f1a6c83
Feat(build version): Put build version into footer.
5 files changed, 14 insertions(+), 5 deletions(-)

M cms.go
M internal/c/c.go
M internal/v/html/_footer.html
M internal/v/tmpls_embed.go
M makefile
M cms.go => cms.go +3 -2
@@ 29,7 29,8 @@ import (
)

var (
	app *App
	app   *App
	build string

	port             = os.Getenv("PORT")
	dbtype           = os.Getenv("DBTYPE")


@@ 108,7 109,7 @@ func init() {

	fs := e3.New(e3user, e3pass, e3url)
	rl := rl.New(log.New(w, "[cms:ratelimit] ", 0), cacher, fs)
	c := c.New(log.New(w, "[cms:content] ", 0), rl, analyticsEnabled)
	c := c.New(log.New(w, "[cms:content] ", 0), rl, analyticsEnabled, build)
	libs := libstripe.New(stripeSuccessURL, stripeErrorURL, stripePK, stripeSK, rl)

	app = &App{

M internal/c/c.go => internal/c/c.go +5 -1
@@ 29,6 29,7 @@ type Controller struct {
	db  dber

	analytics bool // Signifies if analytics/tracking should be on/off (goatcounter).
	buildID   string
}

type dber interface {


@@ 36,11 37,12 @@ type dber interface {
	UserGetFromToken(token string) (user.User, error)
}

func New(log *log.Logger, db dber, analytics bool) *Controller {
func New(log *log.Logger, db dber, analytics bool, buildID string) *Controller {
	return &Controller{
		log,
		db,
		analytics,
		buildID,
	}
}



@@ 145,6 147,8 @@ func (c *Controller) HTML(w http.ResponseWriter, r *http.Request, tmpl *template
		}
	}

	data["Build"] = c.buildID

	if err := tmpl.Execute(&buf, data); err != nil {
		c.Error(w, r, http.StatusInternalServerError, "failed to build html response")
		return

M internal/v/html/_footer.html => internal/v/html/_footer.html +3 -0
@@ 63,6 63,9 @@
        </ul>
      </div>
    </div>
    <div class=row>
      <p class='text-muted text-center mt-5'>v.{{.Build}}</p>
    </div>
  </footer>
</div>
{{if .A}}

M internal/v/tmpls_embed.go => internal/v/tmpls_embed.go +1 -1
@@ 20,7 20,7 @@ func init() {

	tmpls["css/mvp.css"] = tostring("OnJv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tY2VudGVyIG10LTUnPnYue3suQnVpbGR9fTwvcD4KICAgIDwvZGl2PgogIDwvZm9vdGVyPgo8L2Rpdj4Ke3tpZiAuQX19CjxpbWcgc3R5bGU9J3Bvc2l0aW9uOiBmaXhlZDsgYm90dG9tOiAwOyByaWdodDogMDsnIHNyYz0iLy9za2lwcGVyY21zLmdvYXRjb3VudGVyLmNvbS9jb3VudD9wPXt7LkEuUGF0aH19e3tpZiAuQS5SZWZlcnJlcn19JnI9e3suQS5SZWZlcnJlcn19e3tlbmR9fSZybmQ9e3suQS5STkR9fSI+Cnt7ZW5kfX0K")

	tmpls["html/_head.html"] = tostring("PG1ldGEgY2hhcnNldD0ndXRmLTgnPgo8bWV0YSBuYW1lPSd2aWV3cG9ydCcgY29udGVudD0nd2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEnPgo8bGluayByZWw9J2ljb24nIHR5cGU9J2ltYWdlL3gtaWNvbicgaHJlZj0naHR0cHM6Ly9mYXZpY29uLmV2YW5qb24uZXMvMC8xMDUvMjE3LzMyL2Zhdmljb24uaWNvJyAvPgo8bGluayByZWw9J3N0eWxlc2hlZXQnIGhyZWY9Jy9zdGF0aWMvY3NzL2Jvb3RzdHJhcC5taW4uY3NzJyAvPgo=")


M makefile => makefile +2 -1
@@ 1,5 1,6 @@
BIN=cms
ENV=`cat .env`
VER=`git rev-parse HEAD`

all: setup vendor gen build



@@ 12,7 13,7 @@ vendor: go.mod go.sum
	@go mod vendor

build:
	@go build -ldflags='-s -w' -o $(BIN)
	@echo $(VER) | xargs -I {} go build -ldflags='-s -w -X main.build={}' -o $(BIN)

gen: 
	@go generate ./...