Bindata is optional and over-writable on restart (#354)

* Moved conf assets into options folder

* Dropped old bindata

* Started to integrate options bindata and accessors

* Do not enforce a builtin app.ini

* Replaced bindata calls with options

* Dropped bindata task from makefile, it's the generate task now

* Always embedd app.ini to provide sane config defaults

* Use sane defaults for the configuration

* Defined default value for SSH_KEYGEN_PATH

* Dropped "NEVER EVER MODIFY THIS FILE" header from app.ini

* Fixed new paths in latest test additions

* Drop bindata with make clean task

* Set more proper default values
This commit is contained in:
Thomas Boerger 2016-12-22 19:12:23 +01:00 committed by GitHub
parent c21e2c4151
commit b33078fa33
234 changed files with 292 additions and 5404 deletions

View file

@ -2,10 +2,7 @@ DIST := dist
EXECUTABLE := gitea
IMPORT := code.gitea.io/gitea
SHA := $(shell git rev-parse --short HEAD)
DATE := $(shell date -u '+%Y-%m-%d %I:%M:%S %Z')
BINDATA := $(shell find conf | sed 's/ /\\ /g')
BINDATA := modules/{options,public,templates}/bindata.go
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
JAVASCRIPTS :=
@ -33,7 +30,7 @@ all: build
.PHONY: clean
clean:
go clean -i ./...
rm -rf $(EXECUTABLE) $(DIST)
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA)
.PHONY: fmt
fmt:
@ -119,19 +116,6 @@ release-copy:
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: bindata
bindata: modules/bindata/bindata.go
.IGNORE: modules/bindata/bindata.go
modules/bindata/bindata.go: $(BINDATA)
@which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \
go get -u github.com/jteeuwen/go-bindata/...; \
fi
go-bindata -o=$@ -ignore="\\.go|README.md|TRANSLATORS" -pkg=bindata conf/...
go fmt $@
sed -i.bak 's/confLocaleLocale_/confLocaleLocale/' $@
rm $@.bak
.PHONY: javascripts
javascripts: public/js/index.js
@ -147,4 +131,4 @@ public/css/index.css: $(STYLESHEETS)
lessc $< $@
.PHONY: assets
assets: bindata javascripts stylesheets
assets: javascripts stylesheets