1
0
Fork 0

Add verify changed less-file step to Makefile (#1861)

This commit is contained in:
Bo-Yi Wu 2017-07-11 21:28:57 -05:00 committed by Kim "BKC" Carlbäcker
parent 89845f6728
commit 2b05b104ef
4 changed files with 25 additions and 16 deletions

View file

@ -20,6 +20,7 @@ pipeline:
- make generate - make generate
- make vet - make vet
- make lint - make lint
- make stylesheets-check
- make misspell-check - make misspell-check
- make test-vendor - make test-vendor
- make build - make build

File diff suppressed because one or more lines are too long

View file

@ -15,7 +15,6 @@ endif
BINDATA := modules/{options,public,templates}/bindata.go BINDATA := modules/{options,public,templates}/bindata.go
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less) STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
JAVASCRIPTS :=
DOCKER_TAG := gitea/gitea:latest DOCKER_TAG := gitea/gitea:latest
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go") GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
GOFMT ?= gofmt -s GOFMT ?= gofmt -s
@ -82,7 +81,7 @@ generate-swagger:
swagger generate spec -o ./public/swagger.v1.json swagger generate spec -o ./public/swagger.v1.json
$(SED_INPLACE) "s;\".ref\": \"#/definitions/GPGKey\";\"type\": \"object\";g" ./public/swagger.v1.json $(SED_INPLACE) "s;\".ref\": \"#/definitions/GPGKey\";\"type\": \"object\";g" ./public/swagger.v1.json
$(SED_INPLACE) "s;^ \".ref\": \"#/definitions/Repository\"; \"type\": \"object\";g" ./public/swagger.v1.json $(SED_INPLACE) "s;^ \".ref\": \"#/definitions/Repository\"; \"type\": \"object\";g" ./public/swagger.v1.json
.PHONY: errcheck .PHONY: errcheck
errcheck: errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
@ -261,12 +260,24 @@ javascripts: public/js/index.js
public/js/index.js: $(JAVASCRIPTS) public/js/index.js: $(JAVASCRIPTS)
cat $< >| $@ cat $< >| $@
.PHONY: stylesheets-check
stylesheets-check: stylesheets
@diff=$$(git diff public/css/index.css); \
if [ -n "$$diff" ]; then \
echo "Please run 'make less' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
.PHONY: stylesheets .PHONY: stylesheets
stylesheets: public/css/index.css stylesheets: public/css/index.css
.IGNORE: public/css/index.css .IGNORE: public/css/index.css
public/css/index.css: $(STYLESHEETS) public/css/index.css: $(STYLESHEETS)
lessc $< $@ @which lessc > /dev/null; if [ $$? -ne 0 ]; then \
go get -u github.com/kib357/less-go/lessc; \
fi
lessc -i $< -o $@
.PHONY: swagger-ui .PHONY: swagger-ui
swagger-ui: swagger-ui:
@ -276,9 +287,6 @@ swagger-ui:
rm -Rf /tmp/swagger-ui rm -Rf /tmp/swagger-ui
$(SED_INPLACE) "s;http://petstore.swagger.io/v2/swagger.json;../../swagger.v1.json;g" public/assets/swagger-ui/index.html $(SED_INPLACE) "s;http://petstore.swagger.io/v2/swagger.json;../../swagger.v1.json;g" public/assets/swagger-ui/index.html
.PHONY: assets
assets: javascripts stylesheets
.PHONY: update-translations .PHONY: update-translations
update-translations: update-translations:
mkdir -p ./translations mkdir -p ./translations
@ -287,4 +295,4 @@ update-translations:
$(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini $(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini $(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
mv ./translations/*.ini ./options/locale/ mv ./translations/*.ini ./options/locale/
rmdir ./translations rmdir ./translations

View file

@ -430,28 +430,28 @@ footer .ui.language .menu {
} }
@media only screen and (max-width: 1200px) { @media only screen and (max-width: 1200px) {
.ui.menu.new-menu { .ui.menu.new-menu {
overflow-x: auto !important; overflow-x: auto !important;
justify-content: left !important; justify-content: left !important;
padding-bottom: 5px; padding-bottom: 5px;
} }
.ui.menu.new-menu::-webkit-scrollbar { .ui.menu.new-menu::-webkit-scrollbar {
height: 8px; height: 8px;
display: none; display: none;
} }
.ui.menu.new-menu:hover::-webkit-scrollbar { .ui.menu.new-menu:hover::-webkit-scrollbar {
display: block; display: block;
} }
.ui.menu.new-menu::-webkit-scrollbar-track { .ui.menu.new-menu::-webkit-scrollbar-track {
background: rgba(0,0,0,0.01); background: rgba(0, 0, 0, 0.01);
} }
.ui.menu.new-menu::-webkit-scrollbar-thumb { .ui.menu.new-menu::-webkit-scrollbar-thumb {
background:rgba(0,0,0,0.2); background: rgba(0, 0, 0, 0.2);
} }
.ui.menu.new-menu:after { .ui.menu.new-menu:after {
position: absolute; position: absolute;
margin-top: -15px; margin-top: -15px;
display: block; display: block;
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%); background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 100%);
content: ' '; content: ' ';
right: 0; right: 0;
height: 53px; height: 53px;