summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Move gocovmerge as vendor (#10947)Lunny Xiao2020-04-041-4/+1
| | | | | | | | | * Move gocovmerge as vendor * Update Makefile Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Rename scripts to build and add revive command as a new build tool command ↵Lunny Xiao2020-04-031-5/+2
| | | | | (#10942) Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Upgrade golangci-lint to 1.24.0 (#10894)zeripath2020-03-301-2/+2
| | | | | | | * upgrade golangci-lint to 1.24.0 to allow go 1.14 compatibility * fix golangci-lint errors * make make golangci-lint work when out of go-path Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add 'make lint', restructure 'compliance' pipeline (#10861)silverwind2020-03-291-15/+18
| | | | | | | | | | - Added 'lint', 'lint-frontend', 'lint-backend' targets - Added 'lint-frontend', 'lint-backend' ci steps and restructure the 'compliance' pipeline to have a clear separation between frontend and backend and use parallelism where possible. Also, the main build pipelines now depend on 'compliance' so they will skip if it fails. - Added dependencies on ci steps so they skip when 'compliance' fails - Moved JS linters to devDependencies - Removed deprecated 'js' and 'css' targets
* Simplify grep regexp to be more compatible (#10765)Stefan Bethke2020-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Simplify grep regexp to be more compatible The new expression also works with the BSD implementation of grep. Also, I believe the expression did not work consistently for all possible version numers, for example a two digit patch version would not have been matched. * Fix quote * Allow for two and three part version numbers * Select one, two and three part version numbers, reject amd64 * Also allow one to three parts for node version * Use JS code to print node verion in correct format * Avoid grep altogether * Handle go1.14beta1 as well. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* go 1.14 (#10467)techknowlogick2020-03-201-6/+10
|
* Change PACKAGES to GO_PACKAGES for FreeBSD compatibility (#10747)guillep2k2020-03-171-8/+8
| | | Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
* Use whitelist to find go files, run find only once (#10594)silverwind2020-03-081-14/+15
| | | | | | | | | | | | | - Use a whitelist-based approach to find *.go files so we can use standard find syntax. Also included is a change that files no longer pass a leading './' which should help performance further. - Instead of running `find` multiple times in make because of the lazy evaluation, run it only once and add the bindata files when the bindata tag is present This is another huge speedup on my machine of around 2000%. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fix makefile syntax error (#10622)silverwind2020-03-061-1/+1
| | | Fix error found via checkmake. It was the only worthwhile issue it reported.
* Add node version variable to docs (#10620)John Olheiser2020-03-051-2/+2
| | | | | | Also adjusted other version mentions so go version is always mentioned as major.minor and node only as major. Co-authored-by: silverwind <me@silverwind.io>
* Frontend build improvements, fix Fomantic build (#10576)silverwind2020-03-031-12/+16
| | | | | | | | | | | | | | - add package-lock.json to webpack/fomantic prereqs making them always rebuild when dependencies change. - remove FOMANTIC_EVIDENCE. It seemed better to just track a few output files instead. - delete fomantic output files before build to prevent possible bugs in fomantic's build. - resolve WEBPACK_SOURCES only once for performance - reorder variables for clarity - use clean-all in Dockerfile - detect busybox for find syntax Fixes: https://github.com/go-gitea/gitea/issues/10569 Fixes: https://github.com/go-gitea/gitea/issues/10565 Fixes: https://github.com/go-gitea/gitea/issues/10570 Fixes: https://github.com/go-gitea/gitea/issues/10568
* Fix make find command (#10580)silverwind2020-03-021-1/+5
| | | | | | | | | | Continuation of https://github.com/go-gitea/gitea/pull/10577 This version also includes an additional fix for Darwin and FreeBSD which do not accept the `-regextype` option, but only `-E` and the argument order is specifically required like this for `-E` to work. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Speed up make (#10560)silverwind2020-03-021-9/+9
| | | | | | | | | | | | | | | | * Speed up make - stop `find` from venturing into node_modules and other directories that do not contain *.go files - only run `find` once for *.go files - move image tempdir generation to that task - rename GOFILES to GO_SOURCES_OWN for consistency and to indicate that vendor files are not included - pre-resolve FOMANTIC_SOURCES * exclude more Co-authored-by: Lauris BH <lauris@nix.lv>
* Use [:space:] instead of \s (#10508)zeripath2020-02-271-1/+1
|
* Add frontend/backend make targets, fix source release (#10325)silverwind2020-02-221-18/+36
| | | | | | | | | | | | | | | | | | | | | | | * Add frontend/backend make targets, fix source release - Add 'make backend' and 'make frontend' make targets which are used to build go and js/css/svg files respectively. - The 'backend' target can be invoked without requiring Node.js to be present on the system if pre-built frontend assets are present like in the release source tarballs. - Fix source releases missing 'dist' folders inside 'node_modules' which were erronously excluded from tar. - Store VERSION in file VERSION for the release tarballs and prefer that file over git-derived version. * fix release task * fix typo * fix another typo
* remove release-dirs make target (#10350)silverwind2020-02-181-11/+11
| | | | | | | | - only `mkdir`the dist dirs when they are absent - add the dist dirs as prereqs so targets like `make release-sources` can run standalone Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* make: add release-sources (#10295)Antoine GIRARD2020-02-161-1/+5
| | | | | | * make: add release-sources * make: release-sources exclude .git and make_evidence
* add TAGS variable prereq on make targets that use it (#10219)silverwind2020-02-111-3/+13
| | | | | | | | | | | | | | Write out TAGS to .make_evidence/tags and compare it to the previous invocation. If they differ, insert the evidence file into the prereqs of targets that use TAGS. I made it .PHONY so it always builds. I did not include the prereq on release tasks, asssuming the will always do a clean build. Fixes: https://github.com/go-gitea/gitea/issues/10196 Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Improve make PR (force build and help message) (#10178)Antoine GIRARD2020-02-081-1/+2
| | | | | | | | | | | | | | * Force build of assets * Add make pr to make help * apply @jolheiser suggestion Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Run clean-all before make pr Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Reorganize frontend files and tooling (#10168)silverwind2020-02-071-2/+3
| | | | | | | | | | | | - move "vendor" files to js/vendor and less/vendor - move swagger to js/standalone (meant for standalone pages) - move gitgraph to features and streamline its loading - add linting configs to webpack dependencies in make - set ignored files for eslint/stylelint directly in their configs Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* make: improve make pr (#10165)Antoine GIRARD2020-02-061-3/+3
|
* Check if go exists before generating the GOPATH (#10100)zeripath2020-02-011-2/+6
| | | | | | | | * Check if go exists before generating the GOPATH * Move export PATH into Go protected section Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use a file as make evidence for fomantic instead of a directory (#10032)guillep2k2020-02-011-4/+8
| | | | | | | | | | | | | | | * Use evidence file as dependency instead of dir * fix eol * Update .gitignore Co-Authored-By: silverwind <me@silverwind.io> * Use FOMANTIC_SOURCES to establish dependencies as per @silverwind Co-authored-by: silverwind <me@silverwind.io>
* enable babel-loader cache (#10083)silverwind2020-02-011-1/+1
| | | | | | | this speeds up repeated webpack builds by around 20%. It will use the default cache directory `node_modules/.cache/babel-loader`. Also added cache invalidation to workaround https://github.com/babel/babel-loader/issues/690
* fix apple-touch-icon, regenerate images (#10065)silverwind2020-01-301-3/+3
| | | | | | | | | | | | | * fix apple-touch-icon, regenerate images Fixed semi-transparent pixels of apple-touch-icon.png. I had to manually exclude public/img/loading.png from the commit because it's an APNG and one of the tools destroys the animation. * exclude loading.png Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add RACE_ENABLED=1 envs for make test* (#10055)Lunny Xiao2020-01-291-13/+17
|
* Update documentation for the go module era (#9751)zeripath2020-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update documentation for the go module era use go env instead of $GOPATH Update instructions to just use git clone Slight update to readme Signed-off-by: Andrew Thornton <art27@cantab.net> * fixup * Apply suggestions from code review Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> Co-Authored-By: Bagas Sanjaya <bagasdotme@gmail.com> * Apply suggestions from code review * Fix GOPATH settings Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Bagas Sanjaya <bagasdotme@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* add touch-icon with background (#10022)NiTRoeSE2020-01-281-0/+2
| | | | | | | | | | | | * add touch-icon with background ...to prevent ugly glitch while minimize app to homescreen * add / generate apple-touch-icon * run make command Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* move CSS build to webpack (#9983)silverwind2020-01-281-26/+21
| | | | | | | | | | | | | | - added new 'make webpack' target - deprecated 'make js' and 'make css' - extend webpack config to load the less files - updated docs I had to rename the source file of `arc-green.less` to avoid generating a useless JS entrypoint via webpack-fix-style-only-entries which would not work with different source/destination filenames. I hear that there should be cleaner solutions possible once we upgrade to Webpack 5. Co-authored-by: zeripath <art27@cantab.net>
* Generate Bindata iff TAGS="bindata" and not up-to-date (#10004)zeripath2020-01-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | * Only generate bindata if necessary * Only generate bindata if they are not up-to-date * generate a hash of the fileinfo and use that to keep up-to-date * Newer test is redundant * handle missing bindata and clean * Only update hash after successful write * switch to sha1 hash * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Enforce tests do not change files in source tree (#9625)zeripath2020-01-261-0/+12
|
* avoid useless fomantic rebuilds (#9999)silverwind2020-01-261-0/+3
| | | | | | the `fomantic` target for some reason does sometimes not update the timestamp on the directory, leading to useless rebuild. Manually update the timestamp at the end of the build to avoid this and also added the same to js/css targets.
* Change font to Roboto to support more charsets (#9803)Lauris BH2020-01-251-0/+1
|
* make node_modules a order-only prerequisite (#9923)silverwind2020-01-251-4/+4
| | | | | | | | | | | | | | | * make node_modules a order-only prerequisite Package installations and our fomantic step results in changes inside node_modules which lead to make triggering that target unnecessarily. Moved all node_modules prerequisites to order-only which will make skip the timestamp check on in and eliminate useless npm calls. Changes in package-lock.json will still result in reinstallation so node_modules should stay consistent. * revert change to clean-all
* move fomantic target, update 'make help' (#9945)silverwind2020-01-231-5/+6
| | | | | | | I'd like to run webpack without fomantic in the prereqs so move it to the `generate` target. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* misc webpack tweaks (#9924)silverwind2020-01-221-1/+1
| | | | | | | | | | - reduce verbosity during build - use array form `use` to allow easier extension - disable uninteresting source maps - disable symlink resolution for a speedup Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Use npm to manage fomantic and only build needed components (#9561)Lunny Xiao2020-01-211-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use npm to manage fomantic * Only build needed semantic components * Fix make * Don't import fonts from google sites since we have loaded * [misc] devendor fomantic-ui and rebuild upon src or config changes only Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * Change sort alphabetically of semantic components * Fix trailing slash * fix makefile * Remove dependency to gulp from package.json * Fix something * Simplife the makefile * add missed fomantic compnent Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
* Add support for database schema in PostgreSQL (#8819)guillep2k2020-01-201-0/+2
| | | | | | | | | | | | | | | | | | | * Add support for database schema * Require setting search_path for the db user * Add schema setting to admin/config.tmpl * Use a schema different from default for psql tests * Update postgres scripts to use custom schema * Update to xorm/core 0.7.3 and xorm/xorm c37aff9b3a * Fix migration test Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* ci: simplify tag/release by always running coverage (#9774)Antoine GIRARD2020-01-161-3/+3
| | | | | | | | * ci: simplify tag/release by always running coverage * use mod and vendor for unit test coverage * remove not needed lfs for unit test
* move swagger-ui to webpack/npm (#9714)silverwind2020-01-141-8/+0
| | | | | | Created a second webpack output file for swagger-ui which is loaded on the /api/swagger route. One notable difference is the absence of the swagger favicon that was previously used which is now the gitea icon. I see no easy way to restore that favicon, so I decided to not keep it.
* Add test for git + git lfs (#9753)guillep2k2020-01-141-6/+13
|
* ci: go back to golangci-lint 1.20.0 (#9742)Antoine GIRARD2020-01-131-1/+1
| | | Revert https://github.com/go-gitea/gitea/pull/9711
* remove deprecated targets from Makefile (#9729)silverwind2020-01-121-24/+0
| | | | | | | - remove deprecated targets - ensure 1 empty line between targets Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* golangci-lint 1.22.2 (#9711)techknowlogick2020-01-111-1/+1
|
* [Docs] introduce "make help" (#9604)65432020-01-051-0/+19
| | | | | | | | | | | | * introduce "make help" * fix + add more routienes * Update Makefile * add make vet Co-authored-by: techknowlogick <matti@mdranta.net>
* Address minor portability issues (#9414)dankm2019-12-181-1/+4
| | | | | | | | | * Add os specific sed for FreeBSD. * Replace hardcoded "make" with $(MAKE) Some systems don't use GNU make by default, and use something like gnumake or gmake. Respect that when determining the make version.
* Combine Drone release steps (#9338)silverwind2019-12-151-8/+2
| | | | | | | | | | | | | | | | | * Combine Drone release steps Fixes missing JS/CSS because drone did unwanted parallelization of the js/css task and the generate task. Combined the tasks into one and made 'make release' work standalone. Fixes: https://github.com/go-gitea/gitea/issues/9324 Fixes: https://github.com/go-gitea/gitea/issues/9362 * move js/css to generate dependencies * remove unneccessary go-all target * remove go target as well
* prebuild CSS/JS before xgo release binaries (#9293)techknowlogick2019-12-081-1/+1
| | | | | | | | | | * prebuild CSS/JS before xgo release binaries * Update .drone.yml * Update Makefile * update per @lafriks feedback
* Remove explicit 'generate' calls, fix release task (#9288)silverwind2019-12-081-1/+1
| | | | | | | | | | | * Remove more explicit 'generate' calls `generate` is now implicit during `build` since #9114, it is no longer necessary or desired to specify it explicitely. * add js,css,generate dependencies to release task * remove generate warning as per @lunny
* Switch CSS minifier to cssnano (#9260)silverwind2019-12-051-3/+3
| | | | | This results in around 4kB saving in CSS size and also resolves with a particular issue on git bash which had issues with the format of the lessc arguments.