summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add migration for password algorithm change (#12784)zeripath2020-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add migration for password algorithm change #12688 changed the default for the user table leading to sync2 warnings Unfortunately changing defaults requires a complete table rewrite in general. However, just dropping columns could be bad - so this PR leverages the techniques used in recreate table to recreate from the inferred schema and recreates the user table. This is not necessarily the correct thing to do - but code sometimes speaks louder than words. Signed-off-by: Andrew Thornton <art27@cantab.net> * oops Signed-off-by: Andrew Thornton <art27@cantab.net> * ok lets use the shorter bits for other dbs Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/migrations/v150.go * Update models/migrations/v150.go * fix migration Signed-off-by: Andrew Thornton <art27@cantab.net> * mv v150 to v151.go Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use pre-built hugo binary in release step (#12725)techknowlogick2020-09-051-1/+1
| | | | | * Use pre-built hugo binary in release step * decrease verbosity of tar
* Add 'make watch' (#12636)silverwind2020-09-041-0/+5
| | | | | | | | | | | | | | * Add 'make watch' This combines frontend and backend watch into a single command that runs them in parallel on on SIGINT terminates both. Termination is not super-clean but I guess it does not have to. * move to tools/, trap more signals, remove gnu-specific flag * simplify Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Bump min required golang to 1.13 (#12717)techknowlogick2020-09-041-2/+2
| | | | | | | | | | | | | * Bump min required golang to 1.13 * Update config.yaml * Update Makefile * per silverwind feedback * per silverwind Co-authored-by: zeripath <art27@cantab.net>
* Add make targed generate-license & generate-gitignore + Update (#12682)65432020-09-021-0/+11
| | | | | | | * Add make targed generate-license & generate-gitignore * Update Gitignores & Licenses Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* update to latest golangci-lint (v1.30.0) (#12597)techknowlogick2020-08-251-1/+1
|
* go1.15 on windows (#12589)techknowlogick2020-08-241-2/+3
| | | | | * go1.15 on windows * update xgo to use node14
* Fix 'make help' (#12509)silverwind2020-08-171-3/+3
| | | | | These targets are actually using plural names, fix help output for them. Ref: https://github.com/go-gitea/gitea/pull/12352
* Add 'checks' Make and CI tasks (#12352)silverwind2020-08-161-7/+19
| | | | | | | | | | | * Add 'checks' Make and CI tasks Introduce new "checks" targets that perform tasks that we've been piling onto the linting tasks. This will make the linter tasks faster and hopefully encourage some users to use them locally. * add checks to --help Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update gitea-vet to v0.2.1 (#12282)65432020-08-151-1/+1
| | | | | | | | | | | * change to new code location * vendor * tagged version v0.2.0 * gitea-vet v0.2.1 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Build windows using golang 1.14 (#12489)techknowlogick2020-08-131-1/+2
|
* go1.15 (#12475)techknowlogick2020-08-131-1/+1
| | | | | | | | | | | | | * go1.15 * update makefile xgo version * fix vet issue * update docs to version of go in use * add TODO for asyncpreemptoff Co-authored-by: Lauris BH <lauris@nix.lv>
* Move jquery-minicolors to npm/webpack (#12305)silverwind2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | * Move jquery-minicolors to npm/webpack - Unvendor and add as npm dependency - Removed unneeded backend variable - Fixed existing bug where picker would previously initizalize to the same green color when editing a label. There was probably a version bump because the previous version was over 3 years old but it seems to be compatible. * use file-loader * trailing comma and comment update * misc tweaks Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update JS deps and linting config (#12295)silverwind2020-07-271-0/+1
| | | | | | | | - update js deps to latest versions - remove eslint-plugin-sonarjs to prevent a warning on install. can be added again once it's updated to support eslint 7.x - enable new linting rules from eslint-plugin-unicorn Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Detect version of sed in Makefile (#12319)silverwind2020-07-271-9/+6
| | | | | | | | | | | | * Detect version of sed in Makefile It's possible to install GNU sed on Darwin or FreeBSD so it's better to not assume BSD sed on those platforms but to instead perform version detection for the `GNU` string and only use BSD syntax if absent. * silence stderr Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add 'watch-backend' (#12330)silverwind2020-07-271-1/+11
| | | | | | | | | | | | | * Add 'watch-backend' This leverages `air` to watch the backend files and trigger `make backend` automatically when they change. It seems to work rather well together with `watch-frontend`. Fixes: https://github.com/go-gitea/gitea/issues/12318 * rework docs to a new section for continuous build Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Rework 'make generate-images' (#12316)silverwind2020-07-261-28/+2
| | | | | | | | | | | | | | | | | | | | | | | * Rework 'make generate-images' - Remove external dependencies and replace it with a node script that does does the same. - Move detail removal from gitea-sm.png to favicon.png - Remove favicon.ico and its generation, it is unused and we already serve favicon.png in its place. Fixes: https://github.com/go-gitea/gitea/issues/12314 * use proper centering value for preserveAspectRatio * fix lint * use fabric * better linting fix * fix typo * mention detail-remove class in docs
* Remove unused svg and improve 'make svg-check' (#12311)silverwind2020-07-241-2/+3
| | | | - Remove unused source SVG gitea-settings (it was changed to ociticon) - Improve 'make svg-check' to also detect added files
* merge docker makefile into main one (#12289)techknowlogick2020-07-211-2/+13
| | | | | | | | | * merge docker makefile into main one * add readme for docker folder * don't include a file that doesn't exist anymore Co-authored-by: Lauris BH <lauris@nix.lv>
* Release docs as archive (#12253)techknowlogick2020-07-151-1/+1
| | | | | It is ok to use go modules at this point as release-source make target has already been run. Otherwise hugo fails to build. Example of failed build: https://drone.gitea.io/go-gitea/gitea/27976/5/3 Co-authored-by: Lauris BH <lauris@nix.lv>
* release docs as an archive (#12243)Antoine GIRARD2020-07-131-1/+12
| | | | | | | * release docs along sources * use a custom offline version Co-authored-by: Gitea <gitea@fake.local>
* Direct SVG rendering (#12157)silverwind2020-07-121-3/+20
| | | | | | | | | | | | Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: https://github.com/go-gitea/gitea/issues/11618
* Fix potential make error related to fomantic files (#12079)silverwind2020-06-281-5/+5
| | | | | | | | This prevents a potential make errors like "No rule to make sticky.js" that happens when a file is present from a previous build but is not generated in the current build. We don't use these module files from fomantic so it's safe to not depend on them. Related to: https://github.com/go-gitea/gitea/commit/7761245d087c9477ea7f3e50c60daecd6cc6ec14
* Move fomantic and jQuery to main webpack bundle (#11997)silverwind2020-06-271-5/+5
| | | | | | | | | | | | | | This saves around 3 MB binary size by not including useless fomantic files in the build. Also, this allows us to move jQuery into the main bundle as well which eliminates a few HTTP requests. Also included are webpack config changes: - split less and css loaders to speed up compliation - enable css sourcemaps - switch css minfier plugin to cssnano-webpack-plugin which works better for sourcemaps than the previous plugin Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Disable go module when downloading global binaries (#12030)silverwind2020-06-261-6/+6
| | | | | | | | | | Prevent `go get` from touching `go.mod` and `go.sum` when executing global binaries during the build process. Once https://github.com/golang/go/issues/30515 is fixed, we should is whatever solution is provided there. Fixes: https://github.com/go-gitea/gitea/pull/12010 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add public/img/svg to WEBPACK_DEST_ENTRIES (#11993)silverwind2020-06-201-1/+1
| | | | | | Webpack outputs to this directory so it should be removed during cleanup. No backport needed. Co-authored-by: zeripath <art27@cantab.net>
* Increase maximum SQLite variables count to 32766 (#11696)Cirno the Strongest2020-06-051-5/+8
| | | | | per https://www.sqlite.org/limits.html Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update fomantic-ui to 2.8.5 (#11736)silverwind2020-06-031-2/+1
| | | | | | Update to [2.8.5](https://github.com/fomantic/Fomantic-UI/releases/tag/2.8.5) and remove the workaround for the CSS build race condition. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* 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.