summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fix serviceworker output file and misc improvements (#11562)silverwind2020-05-241-3/+4
| | | | | | | | | | | | | | * Fix serviceworker output file and misc improvements - Fix output file location for production build - Cache more asset types: fonts and worker variants - Parallelize a few tasks during initalization - Only invalidate caches starting with our prefix - Remove public/serviceworker.js before building - Remove font preloads, they cause strange cors issues - Misc eslint config adjustments * remove webpack output files on watch-frontend
* docs: update 'Testing redux' in CONTRIBUTING.md (#11386)赵智超2020-05-141-23/+23
| | | | | | | | | | | | * docs: update 'Testing redux' in CONTRIBUTING.md try simplfy it to make it more easy for contributor to follow it to test their work by themselves. Signed-off-by: a1012112796 <1012112796@qq.com> * align help message strings Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Switch code editor to Monaco (#11366)silverwind2020-05-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch code editor to Monaco This switches out CodeMirror for Monaco which is based on the same code base as VS code and should work pretty similar to it. It does add a few async chunks, totalling around 10MB to our build. It currently supports around 65 languages and in the default configuration, each language would emit one ugly [number].js chunk, so I opted to combine them all into a single file for now. CodeMirror is still being used under the hood by SimpleMDE so it can not be removed yet. * inline editorconfig, fix diff, use for markdown, remove more dead code * refactors, remove jquery usage * use tab_width * fix intellisense * rename function for clarity * misc tweaks, enable webpack progress display * only use --progress on dev build * remove useless borders in arc-green * fix typo * remove obsolete comment * small refactor * fix file creation and various refactors * unset useTabStops too when no editorconfig * small refactor * disable webpack's [big] warnings * remove useless await * fix dark theme check * rename chunk to 'monaco' * add to .gitignore and delete webpack dest before build * increase editor height * support more editorconfig properties * remove empty element filter * rename Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Update JS dependencies, min Node.js version 10.13 (#11246)silverwind2020-04-301-1/+1
| | | | | | | `less-loader` now dictates a minimum Node.js version of 10.13.0, released 2018-10-30 so I've updated this requirement to match. https://github.com/webpack-contrib/less-loader/releases/tag/v6.0.0
* Patch fomantic-ui to workaround build issue (#11244)silverwind2020-04-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Patch fomantic-ui to workaround build issue Better workaround than https://github.com/go-gitea/gitea/issues/10653 for https://github.com/fomantic/Fomantic-UI/issues/1356. It does not seem like we're getting a new Fomantic-UI release anytime soon, so this patches it after node_modules installation. Fixes: https://github.com/go-gitea/gitea/issues/11243 Fixes: https://github.com/go-gitea/gitea/issues/10679 * copy instead of patch * update package-lock.json * Update Makefile Co-Authored-By: Sorien <Sorien@users.noreply.github.com> * Update web_src/fomantic/css.js Co-Authored-By: zeripath <art27@cantab.net> Co-authored-by: Sorien <Sorien@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Use /tmp for test repositories (#11126)guillep2k2020-04-191-4/+32
| | | | | | | | | | * Add option to use /tmp for test repositories * Fix exit status * Add feedback about using tmp repos Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* add 'make watch-frontend' and expand docs (#10931)silverwind2020-04-121-0/+5
| | | | | | | | | * add 'make watch-frontend' and expand docs * add bindata note * add .PHONY Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Support running subtests manually (#10988)Mura Li2020-04-071-6/+6
| | | | | | Since GNU Make does not allow '/' in the target patterns, we tranlate the subsequent '.' into '/' for "go test -run". Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Turn off go modules for xgo and gxz (#10963)John Olheiser2020-04-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Turn off go modules for xgo and gxz Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add test release for PR Signed-off-by: jolheiser <john.olheiser@gmail.com> * Try with go modules off Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Makefile, force a release test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Turn on GOPROXY for release Signed-off-by: jolheiser <john.olheiser@gmail.com> * CI Signed-off-by: jolheiser <john.olheiser@gmail.com> * CI Signed-off-by: jolheiser <john.olheiser@gmail.com> * Final commit Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix cross compile (#10952)Lunny Xiao2020-04-051-1/+1
| | | | | | | | | | | | | * Fix cross compile * Add test for cross compile * Fix drone * Fix drone * Also prevent CC environment not to generate Co-authored-by: zeripath <art27@cantab.net>
* Add gitea-vet (#10948)John Olheiser2020-04-051-2/+6
| | | | | | | | | | | | | | | | | * Add copyright Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add gitea-vet and fix non-compliance Signed-off-by: jolheiser <john.olheiser@gmail.com> * Combine tools.go into build.go and clean up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove extra GO111MODULE=on Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Prevent support libraries from compiling into Gitea (#10964)guillep2k2020-04-051-1/+1
| | | | | | | | | | | * Prevent support libraries from compiling into Gitea * Fix tag position * Fix golangci-lint errors * Refactor to make it work Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
* Enable GO111MODULE=on globally in Makefile (#10939)mrsdizzie2020-04-041-16/+16
| | | | | | | Now that our minimum required go version is 1.12 we can remove code that disables GO111MODULE globally and turn it on, so each command doesn't need it set specifically. Also fixes a small bug with make pr that didn't work because GO111MODULE=on wasn't set Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* 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>