You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. DIST := dist
  2. IMPORT := code.gitea.io/gitea
  3. GO ?= go
  4. SED_INPLACE := sed -i
  5. export PATH := $($(GO) env GOPATH)/bin:$(PATH)
  6. ifeq ($(OS), Windows_NT)
  7. EXECUTABLE := gitea.exe
  8. else
  9. EXECUTABLE := gitea
  10. UNAME_S := $(shell uname -s)
  11. ifeq ($(UNAME_S),Darwin)
  12. SED_INPLACE := sed -i ''
  13. endif
  14. endif
  15. BINDATA := modules/{options,public,templates}/bindata.go
  16. GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
  17. GOFMT ?= gofmt -s
  18. GOFLAGS := -i -v
  19. EXTRA_GOFLAGS ?=
  20. ifneq ($(DRONE_TAG),)
  21. VERSION ?= $(subst v,,$(DRONE_TAG))
  22. GITEA_VERSION ?= $(VERSION)
  23. else
  24. ifneq ($(DRONE_BRANCH),)
  25. VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
  26. else
  27. VERSION ?= master
  28. endif
  29. GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
  30. endif
  31. LDFLAGS := -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
  32. PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)))
  33. SOURCES ?= $(shell find . -name "*.go" -type f)
  34. TAGS ?=
  35. TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
  36. SWAGGER_SPEC := templates/swagger/v1_json.tmpl
  37. SWAGGER_SPEC_S_TMPL := s|"basePath":\s*"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
  38. SWAGGER_SPEC_S_JSON := s|"basePath":\s*"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
  39. TEST_MYSQL_HOST ?= mysql:3306
  40. TEST_MYSQL_DBNAME ?= testgitea
  41. TEST_MYSQL_USERNAME ?= root
  42. TEST_MYSQL_PASSWORD ?=
  43. TEST_MYSQL8_HOST ?= mysql8:3306
  44. TEST_MYSQL8_DBNAME ?= testgitea
  45. TEST_MYSQL8_USERNAME ?= root
  46. TEST_MYSQL8_PASSWORD ?=
  47. TEST_PGSQL_HOST ?= pgsql:5432
  48. TEST_PGSQL_DBNAME ?= testgitea
  49. TEST_PGSQL_USERNAME ?= postgres
  50. TEST_PGSQL_PASSWORD ?= postgres
  51. TEST_MSSQL_HOST ?= mssql:1433
  52. TEST_MSSQL_DBNAME ?= gitea
  53. TEST_MSSQL_USERNAME ?= sa
  54. TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1
  55. ifeq ($(OS), Windows_NT)
  56. EXECUTABLE := gitea.exe
  57. else
  58. EXECUTABLE := gitea
  59. endif
  60. # $(call strip-suffix,filename)
  61. strip-suffix = $(firstword $(subst ., ,$(1)))
  62. .PHONY: all
  63. all: build
  64. include docker/Makefile
  65. .PHONY: clean
  66. clean:
  67. $(GO) clean -i ./...
  68. rm -rf $(EXECUTABLE) $(DIST) $(BINDATA) \
  69. integrations*.test \
  70. integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \
  71. integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \
  72. integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini
  73. .PHONY: fmt
  74. fmt:
  75. $(GOFMT) -w $(GOFILES)
  76. .PHONY: vet
  77. vet:
  78. $(GO) vet $(PACKAGES)
  79. .PHONY: generate
  80. generate:
  81. @hash go-bindata > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  82. $(GO) get -u github.com/jteeuwen/go-bindata/go-bindata; \
  83. fi
  84. $(GO) generate $(PACKAGES)
  85. .PHONY: generate-swagger
  86. generate-swagger:
  87. @hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  88. $(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
  89. fi
  90. swagger generate spec -o './$(SWAGGER_SPEC)'
  91. $(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
  92. .PHONY: swagger-check
  93. swagger-check: generate-swagger
  94. @diff=$$(git diff '$(SWAGGER_SPEC)'); \
  95. if [ -n "$$diff" ]; then \
  96. echo "Please run 'make generate-swagger' and commit the result:"; \
  97. echo "$${diff}"; \
  98. exit 1; \
  99. fi;
  100. .PHONY: swagger-validate
  101. swagger-validate:
  102. @hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  103. $(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
  104. fi
  105. $(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
  106. swagger validate './$(SWAGGER_SPEC)'
  107. $(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
  108. .PHONY: errcheck
  109. errcheck:
  110. @hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  111. $(GO) get -u github.com/kisielk/errcheck; \
  112. fi
  113. errcheck $(PACKAGES)
  114. .PHONY: lint
  115. lint:
  116. @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  117. $(GO) get -u github.com/mgechev/revive; \
  118. fi
  119. revive -config .revive.toml -exclude=./vendor/... ./... || exit 1
  120. .PHONY: misspell-check
  121. misspell-check:
  122. @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  123. $(GO) get -u github.com/client9/misspell/cmd/misspell; \
  124. fi
  125. misspell -error -i unknwon $(GOFILES)
  126. .PHONY: misspell
  127. misspell:
  128. @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  129. $(GO) get -u github.com/client9/misspell/cmd/misspell; \
  130. fi
  131. misspell -w -i unknwon $(GOFILES)
  132. .PHONY: fmt-check
  133. fmt-check:
  134. # get all go files and run go fmt on them
  135. @diff=$$($(GOFMT) -d $(GOFILES)); \
  136. if [ -n "$$diff" ]; then \
  137. echo "Please run 'make fmt' and commit the result:"; \
  138. echo "$${diff}"; \
  139. exit 1; \
  140. fi;
  141. .PHONY: test
  142. test:
  143. $(GO) test -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
  144. .PHONY: coverage
  145. coverage:
  146. @hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  147. $(GO) get -u github.com/wadey/gocovmerge; \
  148. fi
  149. gocovmerge integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all;\
  150. .PHONY: unit-test-coverage
  151. unit-test-coverage:
  152. $(GO) test -tags='sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
  153. .PHONY: vendor
  154. vendor:
  155. @hash dep > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  156. $(GO) get -u github.com/golang/dep/cmd/dep; \
  157. fi
  158. dep ensure -vendor-only
  159. .PHONY: test-vendor
  160. test-vendor: vendor
  161. @diff=$$(git diff vendor/); \
  162. if [ -n "$$diff" ]; then \
  163. echo "Please run 'make vendor' and commit the result:"; \
  164. echo "$${diff}"; \
  165. exit 1; \
  166. fi;
  167. #TODO add dep status -missing when implemented
  168. .PHONY: test-sqlite
  169. test-sqlite: integrations.sqlite.test
  170. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test
  171. .PHONY: test-sqlite-migration
  172. test-sqlite-migration: migrations.sqlite.test
  173. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test
  174. generate-ini:
  175. sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
  176. -e 's|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
  177. -e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
  178. -e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
  179. integrations/mysql.ini.tmpl > integrations/mysql.ini
  180. sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
  181. -e 's|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
  182. -e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
  183. -e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
  184. integrations/mysql8.ini.tmpl > integrations/mysql8.ini
  185. sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
  186. -e 's|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
  187. -e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
  188. -e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
  189. integrations/pgsql.ini.tmpl > integrations/pgsql.ini
  190. sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
  191. -e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
  192. -e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
  193. -e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
  194. integrations/mssql.ini.tmpl > integrations/mssql.ini
  195. .PHONY: test-mysql
  196. test-mysql: integrations.test generate-ini
  197. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test
  198. .PHONY: test-mysql-migration
  199. test-mysql-migration: migrations.test generate-ini
  200. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./migrations.test
  201. .PHONY: test-mysql8
  202. test-mysql8: integrations.test generate-ini
  203. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.test
  204. .PHONY: test-mysql8-migration
  205. test-mysql8-migration: migrations.test generate-ini
  206. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./migrations.test
  207. .PHONY: test-pgsql
  208. test-pgsql: integrations.test generate-ini
  209. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test
  210. .PHONY: test-pgsql-migration
  211. test-pgsql-migration: migrations.test generate-ini
  212. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./migrations.test
  213. .PHONY: test-mssql
  214. test-mssql: integrations.test generate-ini
  215. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test
  216. .PHONY: test-mssql-migration
  217. test-mssql-migration: migrations.test generate-ini
  218. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./migrations.test
  219. .PHONY: bench-sqlite
  220. bench-sqlite: integrations.sqlite.test
  221. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  222. .PHONY: bench-mysql
  223. bench-mysql: integrations.test generate-ini
  224. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  225. .PHONY: bench-mssql
  226. bench-mssql: integrations.test generate-ini
  227. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  228. .PHONY: bench-pgsql
  229. bench-pgsql: integrations.test generate-ini
  230. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  231. .PHONY: integration-test-coverage
  232. integration-test-coverage: integrations.cover.test generate-ini
  233. GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
  234. integrations.test: $(SOURCES)
  235. $(GO) test -c code.gitea.io/gitea/integrations -o integrations.test
  236. integrations.sqlite.test: $(SOURCES)
  237. $(GO) test -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
  238. integrations.cover.test: $(SOURCES)
  239. $(GO) test -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test
  240. .PHONY: migrations.test
  241. migrations.test: $(SOURCES)
  242. $(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.test
  243. .PHONY: migrations.sqlite.test
  244. migrations.sqlite.test: $(SOURCES)
  245. $(GO) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'
  246. .PHONY: check
  247. check: test
  248. .PHONY: install
  249. install: $(wildcard *.go)
  250. $(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
  251. .PHONY: build
  252. build: $(EXECUTABLE)
  253. $(EXECUTABLE): $(SOURCES)
  254. $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
  255. .PHONY: release
  256. release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check
  257. .PHONY: release-dirs
  258. release-dirs:
  259. mkdir -p $(DIST)/binaries $(DIST)/release
  260. .PHONY: release-windows
  261. release-windows:
  262. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  263. $(GO) get -u src.techknowlogick.com/xgo; \
  264. fi
  265. xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
  266. ifeq ($(CI),drone)
  267. mv /build/* $(DIST)/binaries
  268. endif
  269. .PHONY: release-linux
  270. release-linux:
  271. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  272. $(GO) get -u src.techknowlogick.com/xgo; \
  273. fi
  274. xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) .
  275. ifeq ($(CI),drone)
  276. mv /build/* $(DIST)/binaries
  277. endif
  278. .PHONY: release-darwin
  279. release-darwin:
  280. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  281. $(GO) get -u src.techknowlogick.com/xgo; \
  282. fi
  283. xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) .
  284. ifeq ($(CI),drone)
  285. mv /build/* $(DIST)/binaries
  286. endif
  287. .PHONY: release-copy
  288. release-copy:
  289. $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
  290. .PHONY: release-check
  291. release-check:
  292. cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
  293. .PHONY: release-compress
  294. release-compress:
  295. @hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  296. $(GO) get -u github.com/ulikunitz/xz/cmd/gxz; \
  297. fi
  298. cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),gxz -k -9 $(notdir $(file));)
  299. .PHONY: javascripts
  300. javascripts: public/js/index.js
  301. .IGNORE: public/js/index.js
  302. public/js/index.js: $(JAVASCRIPTS)
  303. cat $< >| $@
  304. .PHONY: stylesheets-check
  305. stylesheets-check: generate-stylesheets
  306. @diff=$$(git diff public/css/*); \
  307. if [ -n "$$diff" ]; then \
  308. echo "Please run 'make generate-stylesheets' and commit the result:"; \
  309. echo "$${diff}"; \
  310. exit 1; \
  311. fi;
  312. .PHONY: generate-stylesheets
  313. generate-stylesheets:
  314. @hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  315. echo "Please install npm version 5.2+"; \
  316. exit 1; \
  317. fi;
  318. $(eval BROWSERS := "> 1%, last 2 firefox versions, last 2 safari versions, ie 11")
  319. npx lessc --clean-css public/less/index.less public/css/index.css
  320. $(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
  321. $(foreach file, $(wildcard public/css/*),npx postcss --use autoprefixer --autoprefixer.browsers $(BROWSERS) -o $(file) $(file);)
  322. .PHONY: swagger-ui
  323. swagger-ui:
  324. rm -Rf public/vendor/assets/swagger-ui
  325. git clone --depth=10 -b v3.13.4 --single-branch https://github.com/swagger-api/swagger-ui.git $(TMPDIR)/swagger-ui
  326. mv $(TMPDIR)/swagger-ui/dist public/vendor/assets/swagger-ui
  327. rm -Rf $(TMPDIR)/swagger-ui
  328. $(SED_INPLACE) "s;http://petstore.swagger.io/v2/swagger.json;../../../swagger.v1.json;g" public/vendor/assets/swagger-ui/index.html
  329. .PHONY: update-translations
  330. update-translations:
  331. mkdir -p ./translations
  332. cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip
  333. rm ./translations/gitea.zip
  334. $(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
  335. $(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
  336. mv ./translations/*.ini ./options/locale/
  337. rmdir ./translations
  338. .PHONY: generate-images
  339. generate-images:
  340. mkdir -p $(TMPDIR)/images
  341. inkscape -f $(PWD)/assets/logo.svg -w 880 -h 880 -e $(PWD)/public/img/gitea-lg.png
  342. inkscape -f $(PWD)/assets/logo.svg -w 512 -h 512 -e $(PWD)/public/img/gitea-512.png
  343. inkscape -f $(PWD)/assets/logo.svg -w 192 -h 192 -e $(PWD)/public/img/gitea-192.png
  344. inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer1 -e $(TMPDIR)/images/sm-1.png
  345. inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer2 -e $(TMPDIR)/images/sm-2.png
  346. composite -compose atop $(TMPDIR)/images/sm-2.png $(TMPDIR)/images/sm-1.png $(PWD)/public/img/gitea-sm.png
  347. inkscape -f $(PWD)/assets/logo.svg -w 200 -h 200 -e $(PWD)/public/img/avatar_default.png
  348. inkscape -f $(PWD)/assets/logo.svg -w 180 -h 180 -e $(PWD)/public/img/favicon.png
  349. inkscape -f $(PWD)/assets/logo.svg -w 128 -h 128 -e $(TMPDIR)/images/128-raw.png
  350. inkscape -f $(PWD)/assets/logo.svg -w 64 -h 64 -e $(TMPDIR)/images/64-raw.png
  351. inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer1 -e $(TMPDIR)/images/32-1.png
  352. inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer2 -e $(TMPDIR)/images/32-2.png
  353. composite -compose atop $(TMPDIR)/images/32-2.png $(TMPDIR)/images/32-1.png $(TMPDIR)/images/32-raw.png
  354. inkscape -f $(PWD)/assets/logo.svg -w 16 -h 16 -jC -i layer1 -e $(TMPDIR)/images/16-raw.png
  355. zopflipng $(TMPDIR)/images/128-raw.png $(TMPDIR)/images/128.png
  356. zopflipng $(TMPDIR)/images/64-raw.png $(TMPDIR)/images/64.png
  357. zopflipng $(TMPDIR)/images/32-raw.png $(TMPDIR)/images/32.png
  358. zopflipng $(TMPDIR)/images/16-raw.png $(TMPDIR)/images/16.png
  359. rm -f $(TMPDIR)/images/*-*.png
  360. convert $(TMPDIR)/images/16.png $(TMPDIR)/images/32.png \
  361. $(TMPDIR)/images/64.png $(TMPDIR)/images/128.png \
  362. $(PWD)/public/img/favicon.ico
  363. rm -rf $(TMPDIR)/images
  364. .PHONY: pr
  365. pr:
  366. $(GO) run contrib/pr/checkout.go $(PR)