Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. ifeq ($(USE_REPO_TEST_DIR),1)
  2. # This rule replaces the whole Makefile when we're trying to use /tmp repository temporary files
  3. location = $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
  4. self := $(location)
  5. %:
  6. @tmpdir=`mktemp --tmpdir -d` ; \
  7. echo Using temporary directory $$tmpdir for test repositories ; \
  8. USE_REPO_TEST_DIR= $(MAKE) -f $(self) --no-print-directory REPO_TEST_DIR=$$tmpdir/ $@ ; \
  9. STATUS=$$? ; rm -r "$$tmpdir" ; exit $$STATUS
  10. else
  11. # This is the "normal" part of the Makefile
  12. DIST := dist
  13. DIST_DIRS := $(DIST)/binaries $(DIST)/release
  14. IMPORT := code.gitea.io/gitea
  15. export GO111MODULE=on
  16. GO ?= go
  17. SHASUM ?= shasum -a 256
  18. HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
  19. COMMA := ,
  20. XGO_VERSION := go-1.17.x
  21. MIN_GO_VERSION := 001016000
  22. MIN_NODE_VERSION := 012017000
  23. MIN_GOLANGCI_LINT_VERSION := 001044000
  24. DOCKER_IMAGE ?= gitea/gitea
  25. DOCKER_TAG ?= latest
  26. DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
  27. ifeq ($(HAS_GO), GO)
  28. GOPATH ?= $(shell $(GO) env GOPATH)
  29. export PATH := $(GOPATH)/bin:$(PATH)
  30. CGO_EXTRA_CFLAGS := -DSQLITE_MAX_VARIABLE_NUMBER=32766
  31. CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
  32. endif
  33. ifeq ($(OS), Windows_NT)
  34. GOFLAGS := -v -buildmode=exe
  35. EXECUTABLE ?= gitea.exe
  36. else ifeq ($(OS), Windows)
  37. GOFLAGS := -v -buildmode=exe
  38. EXECUTABLE ?= gitea.exe
  39. else
  40. GOFLAGS := -v
  41. EXECUTABLE ?= gitea
  42. endif
  43. ifeq ($(shell sed --version 2>/dev/null | grep -q GNU && echo gnu),gnu)
  44. SED_INPLACE := sed -i
  45. else
  46. SED_INPLACE := sed -i ''
  47. endif
  48. EXTRA_GOFLAGS ?=
  49. MAKE_VERSION := $(shell "$(MAKE)" -v | head -n 1)
  50. MAKE_EVIDENCE_DIR := .make_evidence
  51. ifeq ($(RACE_ENABLED),true)
  52. GOFLAGS += -race
  53. GOTESTFLAGS += -race
  54. endif
  55. STORED_VERSION_FILE := VERSION
  56. ifneq ($(DRONE_TAG),)
  57. VERSION ?= $(subst v,,$(DRONE_TAG))
  58. GITEA_VERSION ?= $(VERSION)
  59. else
  60. ifneq ($(DRONE_BRANCH),)
  61. VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
  62. else
  63. VERSION ?= main
  64. endif
  65. STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null)
  66. ifneq ($(STORED_VERSION),)
  67. GITEA_VERSION ?= $(STORED_VERSION)
  68. else
  69. GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
  70. endif
  71. endif
  72. LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
  73. LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
  74. GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/))
  75. FOMANTIC_WORK_DIR := web_src/fomantic
  76. WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
  77. WEBPACK_CONFIGS := webpack.config.js
  78. WEBPACK_DEST := public/js/index.js public/css/index.css
  79. WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js
  80. BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
  81. BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
  82. SVG_DEST_DIR := public/img/svg
  83. AIR_TMP_DIR := .air
  84. TAGS ?=
  85. TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
  86. TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
  87. TEST_TAGS ?= sqlite sqlite_unlock_notify
  88. TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR)
  89. GO_DIRS := cmd integrations models modules routers build services tools
  90. GO_SOURCES := $(wildcard *.go)
  91. GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
  92. ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
  93. GO_SOURCES += $(BINDATA_DEST)
  94. endif
  95. #To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger
  96. SWAGGER := $(GO) run github.com/go-swagger/go-swagger/cmd/swagger
  97. SWAGGER_SPEC := templates/swagger/v1_json.tmpl
  98. SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g
  99. SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g
  100. SWAGGER_EXCLUDE := code.gitea.io/sdk
  101. SWAGGER_NEWLINE_COMMAND := -e '$$a\'
  102. TEST_MYSQL_HOST ?= mysql:3306
  103. TEST_MYSQL_DBNAME ?= testgitea
  104. TEST_MYSQL_USERNAME ?= root
  105. TEST_MYSQL_PASSWORD ?=
  106. TEST_MYSQL8_HOST ?= mysql8:3306
  107. TEST_MYSQL8_DBNAME ?= testgitea
  108. TEST_MYSQL8_USERNAME ?= root
  109. TEST_MYSQL8_PASSWORD ?=
  110. TEST_PGSQL_HOST ?= pgsql:5432
  111. TEST_PGSQL_DBNAME ?= testgitea
  112. TEST_PGSQL_USERNAME ?= postgres
  113. TEST_PGSQL_PASSWORD ?= postgres
  114. TEST_PGSQL_SCHEMA ?= gtestschema
  115. TEST_MSSQL_HOST ?= mssql:1433
  116. TEST_MSSQL_DBNAME ?= gitea
  117. TEST_MSSQL_USERNAME ?= sa
  118. TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1
  119. .PHONY: all
  120. all: build
  121. .PHONY: help
  122. help:
  123. @echo "Make Routines:"
  124. @echo " - \"\" equivalent to \"build\""
  125. @echo " - build build everything"
  126. @echo " - frontend build frontend files"
  127. @echo " - backend build backend files"
  128. @echo " - watch watch everything and continuously rebuild"
  129. @echo " - watch-frontend watch frontend files and continuously rebuild"
  130. @echo " - watch-backend watch backend files and continuously rebuild"
  131. @echo " - clean delete backend and integration files"
  132. @echo " - clean-all delete backend, frontend and integration files"
  133. @echo " - deps install dependencies"
  134. @echo " - deps-frontend install frontend dependencies"
  135. @echo " - deps-backend install backend dependencies"
  136. @echo " - lint lint everything"
  137. @echo " - lint-frontend lint frontend files"
  138. @echo " - lint-backend lint backend files"
  139. @echo " - checks run various consistency checks"
  140. @echo " - checks-frontend check frontend files"
  141. @echo " - checks-backend check backend files"
  142. @echo " - test test everything"
  143. @echo " - test-frontend test frontend files"
  144. @echo " - test-backend test backend files"
  145. @echo " - webpack build webpack files"
  146. @echo " - svg build svg files"
  147. @echo " - fomantic build fomantic files"
  148. @echo " - generate run \"go generate\""
  149. @echo " - fmt format the Go code"
  150. @echo " - generate-license update license files"
  151. @echo " - generate-gitignore update gitignore files"
  152. @echo " - generate-manpage generate manpage"
  153. @echo " - generate-swagger generate the swagger spec from code comments"
  154. @echo " - swagger-validate check if the swagger spec is valid"
  155. @echo " - golangci-lint run golangci-lint linter"
  156. @echo " - vet examines Go source code and reports suspicious constructs"
  157. @echo " - test[\#TestSpecificName] run unit test"
  158. @echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
  159. @echo " - pr#<index> build and start gitea from a PR with integration test data loaded"
  160. .PHONY: go-check
  161. go-check:
  162. $(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
  163. @if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
  164. echo "Gitea requires Go 1.16 or greater to build. You can get it at https://golang.org/dl/"; \
  165. exit 1; \
  166. fi
  167. .PHONY: git-check
  168. git-check:
  169. @if git lfs >/dev/null 2>&1 ; then : ; else \
  170. echo "Gitea requires git with lfs support to run tests." ; \
  171. exit 1; \
  172. fi
  173. .PHONY: node-check
  174. node-check:
  175. $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
  176. $(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...)))
  177. $(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
  178. @if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
  179. echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
  180. exit 1; \
  181. fi
  182. .PHONY: clean-all
  183. clean-all: clean
  184. rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
  185. .PHONY: clean
  186. clean:
  187. $(GO) clean -i ./...
  188. rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST) $(BINDATA_HASH) \
  189. integrations*.test \
  190. integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \
  191. integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \
  192. integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini man/
  193. .PHONY: fmt
  194. fmt:
  195. @hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  196. $(GO) install mvdan.cc/gofumpt@v0.3.0; \
  197. fi
  198. @echo "Running gitea-fmt (with gofumpt)..."
  199. @$(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
  200. .PHONY: vet
  201. vet:
  202. @echo "Running go vet..."
  203. @GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
  204. @$(GO) vet -vettool=gitea-vet $(GO_PACKAGES)
  205. .PHONY: $(TAGS_EVIDENCE)
  206. $(TAGS_EVIDENCE):
  207. @mkdir -p $(MAKE_EVIDENCE_DIR)
  208. @echo "$(TAGS)" > $(TAGS_EVIDENCE)
  209. ifneq "$(TAGS)" "$(shell cat $(TAGS_EVIDENCE) 2>/dev/null)"
  210. TAGS_PREREQ := $(TAGS_EVIDENCE)
  211. endif
  212. .PHONY: generate-swagger
  213. generate-swagger:
  214. $(SWAGGER) generate spec -x "$(SWAGGER_EXCLUDE)" -o './$(SWAGGER_SPEC)'
  215. $(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
  216. $(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
  217. .PHONY: swagger-check
  218. swagger-check: generate-swagger
  219. @diff=$$(git diff '$(SWAGGER_SPEC)'); \
  220. if [ -n "$$diff" ]; then \
  221. echo "Please run 'make generate-swagger' and commit the result:"; \
  222. echo "$${diff}"; \
  223. exit 1; \
  224. fi
  225. .PHONY: swagger-validate
  226. swagger-validate:
  227. $(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
  228. $(SWAGGER) validate './$(SWAGGER_SPEC)'
  229. $(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
  230. .PHONY: errcheck
  231. errcheck:
  232. @hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  233. $(GO) install github.com/kisielk/errcheck@8ddee489636a8311a376fc92e27a6a13c6658344; \
  234. fi
  235. @echo "Running errcheck..."
  236. @errcheck $(GO_PACKAGES)
  237. .PHONY: fmt-check
  238. fmt-check:
  239. @hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  240. $(GO) install mvdan.cc/gofumpt@0.3.0; \
  241. fi
  242. # get all go files and run gitea-fmt (with gofmt) on them
  243. @diff=$$($(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \
  244. if [ -n "$$diff" ]; then \
  245. echo "Please run 'make fmt' and commit the result:"; \
  246. echo "$${diff}"; \
  247. exit 1; \
  248. fi
  249. .PHONY: checks
  250. checks: checks-frontend checks-backend
  251. .PHONY: checks-frontend
  252. checks-frontend: lockfile-check svg-check
  253. .PHONY: checks-backend
  254. checks-backend: gomod-check swagger-check swagger-validate
  255. .PHONY: lint
  256. lint: lint-frontend lint-backend
  257. .PHONY: lint-frontend
  258. lint-frontend: node_modules
  259. npx eslint --color --max-warnings=0 web_src/js build templates *.config.js docs/assets/js
  260. npx stylelint --color --max-warnings=0 web_src/less
  261. .PHONY: lint-backend
  262. lint-backend: golangci-lint vet editorconfig-checker
  263. .PHONY: watch
  264. watch:
  265. bash tools/watch.sh
  266. .PHONY: watch-frontend
  267. watch-frontend: node-check node_modules
  268. rm -rf $(WEBPACK_DEST_ENTRIES)
  269. NODE_ENV=development npx webpack --watch --progress
  270. .PHONY: watch-backend
  271. watch-backend: go-check
  272. @hash air > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  273. $(GO) install github.com/cosmtrek/air@bedc18201271882c2be66d216d0e1a275b526ec4; \
  274. fi
  275. air -c .air.toml
  276. .PHONY: test
  277. test: test-frontend test-backend
  278. .PHONY: test-backend
  279. test-backend:
  280. @echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
  281. @$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_PACKAGES)
  282. .PHONY: test-frontend
  283. test-frontend: node_modules
  284. @NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
  285. .PHONY: test-check
  286. test-check:
  287. @echo "Running test-check...";
  288. @diff=$$(git status -s); \
  289. if [ -n "$$diff" ]; then \
  290. echo "make test-backend has changed files in the source tree:"; \
  291. echo "$${diff}"; \
  292. echo "You should change the tests to create these files in a temporary directory."; \
  293. echo "Do not simply add these files to .gitignore"; \
  294. exit 1; \
  295. fi
  296. .PHONY: test\#%
  297. test\#%:
  298. @echo "Running go test with -tags '$(TEST_TAGS)'..."
  299. @$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_PACKAGES)
  300. .PHONY: coverage
  301. coverage:
  302. grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
  303. grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
  304. GO111MODULE=on $(GO) run build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1)
  305. .PHONY: unit-test-coverage
  306. unit-test-coverage:
  307. @echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
  308. @$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
  309. .PHONY: vendor
  310. vendor:
  311. $(GO) mod tidy && $(GO) mod vendor
  312. .PHONY: gomod-check
  313. gomod-check:
  314. @$(GO) mod tidy
  315. @diff=$$(git diff go.sum); \
  316. if [ -n "$$diff" ]; then \
  317. echo "Please run '$(GO) mod tidy' and commit the result:"; \
  318. echo "$${diff}"; \
  319. exit 1; \
  320. fi
  321. generate-ini-sqlite:
  322. sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
  323. integrations/sqlite.ini.tmpl > integrations/sqlite.ini
  324. .PHONY: test-sqlite
  325. test-sqlite: integrations.sqlite.test generate-ini-sqlite
  326. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test
  327. .PHONY: test-sqlite\#%
  328. test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
  329. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
  330. .PHONY: test-sqlite-migration
  331. test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
  332. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test
  333. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test
  334. .PHONY: test-sqlite-migration\#%
  335. test-sqlite-migration\#%: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite
  336. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*)
  337. generate-ini-mysql:
  338. sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
  339. -e 's|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
  340. -e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
  341. -e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
  342. -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
  343. integrations/mysql.ini.tmpl > integrations/mysql.ini
  344. .PHONY: test-mysql
  345. test-mysql: integrations.mysql.test generate-ini-mysql
  346. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test
  347. .PHONY: test-mysql\#%
  348. test-mysql\#%: integrations.mysql.test generate-ini-mysql
  349. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
  350. .PHONY: test-mysql-migration
  351. test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql
  352. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test
  353. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.individual.mysql.test
  354. generate-ini-mysql8:
  355. sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
  356. -e 's|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
  357. -e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
  358. -e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
  359. -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
  360. integrations/mysql8.ini.tmpl > integrations/mysql8.ini
  361. .PHONY: test-mysql8
  362. test-mysql8: integrations.mysql8.test generate-ini-mysql8
  363. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test
  364. .PHONY: test-mysql8\#%
  365. test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
  366. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
  367. .PHONY: test-mysql8-migration
  368. test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8
  369. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test
  370. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.individual.mysql8.test
  371. generate-ini-pgsql:
  372. sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
  373. -e 's|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
  374. -e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
  375. -e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
  376. -e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \
  377. -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
  378. integrations/pgsql.ini.tmpl > integrations/pgsql.ini
  379. .PHONY: test-pgsql
  380. test-pgsql: integrations.pgsql.test generate-ini-pgsql
  381. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test
  382. .PHONY: test-pgsql\#%
  383. test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
  384. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
  385. .PHONY: test-pgsql-migration
  386. test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql
  387. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.pgsql.test
  388. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.individual.pgsql.test
  389. generate-ini-mssql:
  390. sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
  391. -e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
  392. -e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
  393. -e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
  394. -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
  395. integrations/mssql.ini.tmpl > integrations/mssql.ini
  396. .PHONY: test-mssql
  397. test-mssql: integrations.mssql.test generate-ini-mssql
  398. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test
  399. .PHONY: test-mssql\#%
  400. test-mssql\#%: integrations.mssql.test generate-ini-mssql
  401. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
  402. .PHONY: test-mssql-migration
  403. test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql
  404. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.mssql.test -test.failfast
  405. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.individual.mssql.test -test.failfast
  406. .PHONY: bench-sqlite
  407. bench-sqlite: integrations.sqlite.test generate-ini-sqlite
  408. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  409. .PHONY: bench-mysql
  410. bench-mysql: integrations.mysql.test generate-ini-mysql
  411. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  412. .PHONY: bench-mssql
  413. bench-mssql: integrations.mssql.test generate-ini-mssql
  414. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  415. .PHONY: bench-pgsql
  416. bench-pgsql: integrations.pgsql.test generate-ini-pgsql
  417. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
  418. .PHONY: integration-test-coverage
  419. integration-test-coverage: integrations.cover.test generate-ini-mysql
  420. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
  421. .PHONY: integration-test-coverage-sqlite
  422. integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
  423. GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
  424. integrations.mysql.test: git-check $(GO_SOURCES)
  425. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql.test
  426. integrations.mysql8.test: git-check $(GO_SOURCES)
  427. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
  428. integrations.pgsql.test: git-check $(GO_SOURCES)
  429. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
  430. integrations.mssql.test: git-check $(GO_SOURCES)
  431. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mssql.test
  432. integrations.sqlite.test: git-check $(GO_SOURCES)
  433. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags '$(TEST_TAGS)'
  434. integrations.cover.test: git-check $(GO_SOURCES)
  435. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test
  436. integrations.cover.sqlite.test: git-check $(GO_SOURCES)
  437. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
  438. .PHONY: migrations.mysql.test
  439. migrations.mysql.test: $(GO_SOURCES)
  440. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test
  441. .PHONY: migrations.mysql8.test
  442. migrations.mysql8.test: $(GO_SOURCES)
  443. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql8.test
  444. .PHONY: migrations.pgsql.test
  445. migrations.pgsql.test: $(GO_SOURCES)
  446. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.pgsql.test
  447. .PHONY: migrations.mssql.test
  448. migrations.mssql.test: $(GO_SOURCES)
  449. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mssql.test
  450. .PHONY: migrations.sqlite.test
  451. migrations.sqlite.test: $(GO_SOURCES)
  452. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
  453. .PHONY: migrations.individual.mysql.test
  454. migrations.individual.mysql.test: $(GO_SOURCES)
  455. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql.test
  456. .PHONY: migrations.individual.mysql8.test
  457. migrations.individual.mysql8.test: $(GO_SOURCES)
  458. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql8.test
  459. .PHONY: migrations.individual.pgsql.test
  460. migrations.individual.pgsql.test: $(GO_SOURCES)
  461. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.pgsql.test
  462. .PHONY: migrations.individual.mssql.test
  463. migrations.individual.mssql.test: $(GO_SOURCES)
  464. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mssql.test
  465. .PHONY: migrations.individual.sqlite.test
  466. migrations.individual.sqlite.test: $(GO_SOURCES)
  467. $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)'
  468. .PHONY: check
  469. check: test
  470. .PHONY: install $(TAGS_PREREQ)
  471. install: $(wildcard *.go)
  472. CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
  473. .PHONY: build
  474. build: frontend backend
  475. .PHONY: frontend
  476. frontend: $(WEBPACK_DEST)
  477. .PHONY: backend
  478. backend: go-check generate $(EXECUTABLE)
  479. .PHONY: generate
  480. generate: $(TAGS_PREREQ)
  481. @echo "Running go generate..."
  482. @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
  483. $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
  484. CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
  485. .PHONY: release
  486. release: frontend generate release-windows release-linux release-darwin release-copy release-compress vendor release-sources release-docs release-check
  487. $(DIST_DIRS):
  488. mkdir -p $(DIST_DIRS)
  489. .PHONY: release-windows
  490. release-windows: | $(DIST_DIRS)
  491. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  492. $(GO) install src.techknowlogick.com/xgo@latest; \
  493. fi
  494. CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
  495. ifeq (,$(findstring gogit,$(TAGS)))
  496. CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
  497. endif
  498. ifeq ($(CI),drone)
  499. cp /build/* $(DIST)/binaries
  500. endif
  501. .PHONY: release-linux
  502. release-linux: | $(DIST_DIRS)
  503. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  504. $(GO) install src.techknowlogick.com/xgo@latest; \
  505. fi
  506. CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
  507. ifeq ($(CI),drone)
  508. cp /build/* $(DIST)/binaries
  509. endif
  510. .PHONY: release-darwin
  511. release-darwin: | $(DIST_DIRS)
  512. @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  513. $(GO) install src.techknowlogick.com/xgo@latest; \
  514. fi
  515. CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
  516. ifeq ($(CI),drone)
  517. cp /build/* $(DIST)/binaries
  518. endif
  519. .PHONY: release-copy
  520. release-copy: | $(DIST_DIRS)
  521. cd $(DIST); for file in `find /build -type f -name "*"`; do cp $${file} ./release/; done;
  522. .PHONY: release-check
  523. release-check: | $(DIST_DIRS)
  524. cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "checksumming $${file}" && $(SHASUM) `echo $${file} | sed 's/^..//'` > $${file}.sha256; done;
  525. .PHONY: release-compress
  526. release-compress: | $(DIST_DIRS)
  527. @hash gxz > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  528. $(GO) install github.com/ulikunitz/xz/cmd/gxz@v0.5.10; \
  529. fi
  530. cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
  531. .PHONY: release-sources
  532. release-sources: | $(DIST_DIRS)
  533. echo $(VERSION) > $(STORED_VERSION_FILE)
  534. # bsdtar needs a ^ to prevent matching subdirectories
  535. $(eval EXCL := --exclude=$(shell tar --help | grep -q bsdtar && echo "^")./)
  536. tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
  537. rm -f $(STORED_VERSION_FILE)
  538. .PHONY: release-docs
  539. release-docs: | $(DIST_DIRS) docs
  540. tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .
  541. .PHONY: docs
  542. docs:
  543. @hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  544. curl -sL https://github.com/gohugoio/hugo/releases/download/v0.74.3/hugo_0.74.3_Linux-64bit.tar.gz | tar zxf - -C /tmp && mv /tmp/hugo /usr/bin/hugo && chmod +x /usr/bin/hugo; \
  545. fi
  546. cd docs; make trans-copy clean build-offline;
  547. .PHONY: deps
  548. deps: deps-frontend deps-backend
  549. .PHONY: deps-frontend
  550. deps-frontend: node_modules
  551. .PHONY: deps-backend
  552. deps-backend:
  553. $(GO) mod download
  554. node_modules: package-lock.json
  555. npm install --no-save
  556. @touch node_modules
  557. .PHONY: npm-update
  558. npm-update: node-check | node_modules
  559. npx updates -cu
  560. rm -rf node_modules package-lock.json
  561. npm install --package-lock
  562. @touch node_modules
  563. .PHONY: fomantic
  564. fomantic:
  565. rm -rf $(FOMANTIC_WORK_DIR)/build
  566. cd $(FOMANTIC_WORK_DIR) && npm install --no-save
  567. cp -f $(FOMANTIC_WORK_DIR)/theme.config.less $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/theme.config
  568. cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
  569. cp -f web_src/js/vendor/dropdown.js $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/definitions/modules
  570. cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
  571. rm -f $(FOMANTIC_WORK_DIR)/build/*.min.*
  572. .PHONY: webpack
  573. webpack: $(WEBPACK_DEST)
  574. $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
  575. @$(MAKE) -s node-check node_modules
  576. rm -rf $(WEBPACK_DEST_ENTRIES)
  577. npx webpack
  578. @touch $(WEBPACK_DEST)
  579. .PHONY: svg
  580. svg: node-check | node_modules
  581. rm -rf $(SVG_DEST_DIR)
  582. node build/generate-svg.js
  583. .PHONY: svg-check
  584. svg-check: svg
  585. @git add $(SVG_DEST_DIR)
  586. @diff=$$(git diff --cached $(SVG_DEST_DIR)); \
  587. if [ -n "$$diff" ]; then \
  588. echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
  589. echo "$${diff}"; \
  590. exit 1; \
  591. fi
  592. .PHONY: lockfile-check
  593. lockfile-check:
  594. npm install --package-lock-only
  595. @diff=$$(git diff package-lock.json); \
  596. if [ -n "$$diff" ]; then \
  597. echo "package-lock.json is inconsistent with package.json"; \
  598. echo "Please run 'npm install --package-lock-only' and commit the result:"; \
  599. echo "$${diff}"; \
  600. exit 1; \
  601. fi
  602. .PHONY: update-translations
  603. update-translations:
  604. mkdir -p ./translations
  605. cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip
  606. rm ./translations/gitea.zip
  607. $(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
  608. $(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
  609. mv ./translations/*.ini ./options/locale/
  610. rmdir ./translations
  611. .PHONY: generate-license
  612. generate-license:
  613. GO111MODULE=on $(GO) run build/generate-licenses.go
  614. .PHONY: generate-gitignore
  615. generate-gitignore:
  616. GO111MODULE=on $(GO) run build/generate-gitignores.go
  617. .PHONY: generate-images
  618. generate-images: | node_modules
  619. npm install --no-save --no-package-lock fabric@4 imagemin-zopfli@7
  620. node build/generate-images.js $(TAGS)
  621. .PHONY: generate-manpage
  622. generate-manpage:
  623. @[ -f gitea ] || make backend
  624. @mkdir -p man/man1/ man/man5
  625. @./gitea docs --man > man/man1/gitea.1
  626. @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
  627. @#TODO A smal script witch format config-cheat-sheet.en-us.md nicely to suit as config man page
  628. .PHONY: pr\#%
  629. pr\#%: clean-all
  630. $(GO) run contrib/pr/checkout.go $*
  631. .PHONY: golangci-lint
  632. golangci-lint: golangci-lint-check
  633. golangci-lint run --timeout 10m
  634. .PHONY: golangci-lint-check
  635. golangci-lint-check:
  636. $(eval GOLANGCI_LINT_VERSION := $(shell printf "%03d%03d%03d" $(shell golangci-lint --version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
  637. $(eval MIN_GOLANGCI_LINT_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_GOLANGCI_LINT_VERSION) | grep -o ...)))
  638. @hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  639. echo "Downloading golangci-lint v${MIN_GOLANGCI_LINT_VER_FMT}"; \
  640. export BINARY="golangci-lint"; \
  641. curl -sfL "https://raw.githubusercontent.com/golangci/golangci-lint/v${MIN_GOLANGCI_LINT_VER_FMT}/install.sh" | sh -s -- -b $(GOPATH)/bin v$(MIN_GOLANGCI_LINT_VER_FMT); \
  642. elif [ "$(GOLANGCI_LINT_VERSION)" -lt "$(MIN_GOLANGCI_LINT_VERSION)" ]; then \
  643. echo "Downloading newer version of golangci-lint v${MIN_GOLANGCI_LINT_VER_FMT}"; \
  644. export BINARY="golangci-lint"; \
  645. curl -sfL "https://raw.githubusercontent.com/golangci/golangci-lint/v${MIN_GOLANGCI_LINT_VER_FMT}/install.sh" | sh -s -- -b $(GOPATH)/bin v$(MIN_GOLANGCI_LINT_VER_FMT); \
  646. fi
  647. .PHONY: editorconfig-checker
  648. editorconfig-checker:
  649. @hash editorconfig-checker > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  650. $(GO) install github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@50adf46752da119dfef66e57be3ce2693ea4aa9c; \
  651. fi
  652. editorconfig-checker templates
  653. .PHONY: docker
  654. docker:
  655. docker build --disable-content-trust=false -t $(DOCKER_REF) .
  656. # support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
  657. .PHONY: docker-build
  658. docker-build:
  659. docker run -ti --rm -v "$(CURDIR):/srv/app/src/code.gitea.io/gitea" -w /srv/app/src/code.gitea.io/gitea -e TAGS="bindata $(TAGS)" LDFLAGS="$(LDFLAGS)" CGO_EXTRA_CFLAGS="$(CGO_EXTRA_CFLAGS)" webhippie/golang:edge make clean build
  660. # This endif closes the if at the top of the file
  661. endif