summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fixed irritating error message related to go version (#14611)uli-heller2021-02-081-1/+1
| | | | | | | | | I do have go-1.13.8 installed and get the error message ``` Gitea requires Go 1.13 or greater to build. You can get it at https://golang.org/dl/ ``` I do thing that Go 1.14 or greater is actually required
* Use caddy's certmagic library for extensible/robust ACME handling (#14177)techknowlogick2021-01-251-1/+1
| | | | | | | | | | * use certmagic for more extensible/robust ACME cert handling * accept TOS based on config option Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update golangci-lint to 1.35.2 (#14418)techknowlogick2021-01-211-1/+1
|
* It seems vet on windows is unnecessary (#14302)Lunny Xiao2021-01-191-1/+1
| | | | | * It seems vet on windows is unnecessary * add vet back to drone but remove GOOS and GOARCH when build vet
* deprecate building for mips (#14174)techknowlogick2021-01-011-1/+1
| | | Co-authored-by: zeripath <art27@cantab.net>
* Update JS dependencies and webpack (#14118)silverwind2020-12-271-4/+4
| | | | | | | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - Adapt webpack config for version 5 - Update to Less 4.0, adapting usage of removed mixin syntax - Enable new ESLint rules and fix discovered issues * update license-webpack-plugin to fix missing licenses * update license-webpack-plugin once more to get webpack into the license output * switch to license-checker-webpack-plugin again for performance * update deps again Co-authored-by: Lauris BH <lauris@nix.lv>
* put ${CURDIR} in quotes to prevent make from splitting paths with spaces ↵Kyle D2020-12-181-21/+21
| | | | into separate strings (#14056)
* gitea png to logo (#13974)Kyle D2020-12-181-1/+1
| | | | | | | | | | | * gitea png to logo.svg * gitea safari svg to logo * minify svgs * Update english docs * Update missing section on customizing logo
* Makefile cleanup & double golangci-lint timeout (#14044)silverwind2020-12-171-4/+2
| | | | | | | | * Makefile cleanup The xmldom dependency is no longer required since #13680. Also, whitespace cleanup. * double the golangci-lint timeout
* Use native git variants by default with go-git variants as build tag (#13673)zeripath2020-12-171-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move last commit cache back into modules/git Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove go-git from the interface for last commit cache Signed-off-by: Andrew Thornton <art27@cantab.net> * move cacheref to last_commit_cache Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove go-git from routers/private/hook Signed-off-by: Andrew Thornton <art27@cantab.net> * Move FindLFSFiles to pipeline Signed-off-by: Andrew Thornton <art27@cantab.net> * Make no-go-git variants Signed-off-by: Andrew Thornton <art27@cantab.net> * Submodule RefID Signed-off-by: Andrew Thornton <art27@cantab.net> * fix issue with GetCommitsInfo Signed-off-by: Andrew Thornton <art27@cantab.net> * fix GetLastCommitForPaths Signed-off-by: Andrew Thornton <art27@cantab.net> * Improve efficiency Signed-off-by: Andrew Thornton <art27@cantab.net> * More efficiency Signed-off-by: Andrew Thornton <art27@cantab.net> * even faster Signed-off-by: Andrew Thornton <art27@cantab.net> * Reduce duplication * As per @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * attempt to fix drone Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test-tags Signed-off-by: Andrew Thornton <art27@cantab.net> * default to use no-go-git variants and add gogit build tag Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Added 2 fuzzers (#13818)AdamKorcz2020-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added fuzzer Signed-off-by: AdamKorcz <adam@adalogics.com> * Added better fuzzer names Signed-off-by: AdamKorcz <adam@adalogics.com> * Moved fuzzer to /tools * Update tools/fuzz.go Co-authored-by: 6543 <6543@obermui.de> * Update tools/fuzz.go * Update tools/fuzz.go Co-authored-by: silverwind <me@silverwind.io> * Added tools to Makefile Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net>
* Reduce make verbosity (#13803)silverwind2020-12-031-14/+21
| | | | | | | Various make targets log huge lists of files to the terminal which are generally useless to read. Replace those cases with short replacement messages. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix webpack build warnings (#13752)silverwind2020-11-301-2/+2
| | | | | Turns out some of the dependencies make use of optional dependencies like the vue-template-compiler. Install them again and install fomantic-ui only when it's being build to fix webpack warnings.
* Update JS dependencies and misc tweaks (#13741)silverwind2020-11-291-6/+9
| | | | | | | | | | | | | | | | | * Update JS dependencies and misc tweaks - Update all JS dependencies minus webpack - Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE - Set eslint parser to latest and add new eslint 7.14 rule - Speed up npm install by disabling audit and fund checks - Move fomantic-ui to optional dependencies to further speed up npm - Enable syntax highlighting on GH for .eslintrc and .stylelintrc - Makefile cleanups * disable audit in npmrc * add missing dash Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Format files (#13698)65432020-11-281-2/+2
| | | | | | | | | | | | | | | | * align "make help" * format * untouch build/generate-svg.js * untouch .eslintrc * combine editorconfig's * rm editorconfig Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Enable linting of JS inside templates (#13708)silverwind2020-11-281-1/+1
| | | | | | | | | | Indentation-related rules are disabled because indent templates with tabs but our lint rules expect spaces. Also had to exclude a few files where using template variables in the JS is causing syntax errors for the JS parser. I don't think there's a way to solve this otherwise. Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix Fomatic Build (#13595)silverwind2020-11-161-2/+2
| | | Port of #13593 to 1.14
* Add Vue linting (#13447)silverwind2020-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * Add Vue linting Turns out the .vue files were not linted at all, so I added that as well as re-indented the file to 2-space and fixed all reasonable issues that cam up except one case of a unintended side effect for which I have no idea how to fix it, so the rule was disabled. * misc tweaks * update lockfile * use overrides to include .vue files * treat warnings as errors on lint-frontend * also treat stylelint warnings as errors * use equal sign syntax Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fully remove fomantic-ui from frontend build dependencies (#13340)silverwind2020-10-281-1/+1
| | | | | | | Followup to https://github.com/go-gitea/gitea/pull/13332. Turns out I missed this dependency which resulted in fomantic-ui being uselessly rebuild on CI. This fully removes it from the chain so it's not attempted to be build as part of the main build process.
* Precompile fomantic-ui files (#13332)silverwind2020-10-271-3/+3
| | | | | | | | | | | We rarely change fomantic-ui or its configuration so it's kind of a waste to have it rebuild on every CI run. These changes remove the fomantic files from the build and instead add the relevant output files to the git index, which should shave of 2-3 minutes on every CI run. `make fomantic` should still work and should be ran whenever fomantic is updated or its configuration is changed. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use GO variable in go-check target (#13146) (#13147)E142020-10-151-1/+1
|
* Gitea 2 Gitea migration (#12657)65432020-10-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * first draft * update gitea sdk to 9e280adb4da * adapt feat of updated sdk * releases now works * break the Reactions loop * use convertGiteaLabel * fix endless loop because paggination is not supported there !!! * rename gitea local uploader files * pagination can bite you in the ass * Version Checks * lint * docs * rename gitea sdk import to miss future conficts * go-swagger: dont scan the sdk structs * make sure gitea can shutdown gracefully * make GetPullRequests and GetIssues similar * rm useles * Add Test: started ... * ... add tests ... * Add tests and Fixing things * Workaround missing SHA * Adapt: Ensure that all migration requests are cancellable (714ab71ddc4260937b1480519d453d2dc4e77dd6) * LINT: fix misspells in test set * adapt ListMergeRequestAwardEmoji * update sdk * Return error when creating giteadownloader failed * update sdk * adapt new sdk * adopt new features * check version before err * adapt: 'migrate service type switch page' * optimize * Fix DefaultBranch * impruve * handle subPath * fix test * Fix ReviewCommentPosition * test GetReviews * add DefaultBranch int test set * rm unused * Update SDK to v0.13.0 * addopt sdk changes * found better link * format template * Update Docs * Update Gitea SDK (v0.13.1)
* Update golangci-lint to version 1.31.0 (#13102)kolaente2020-10-111-1/+1
| | | | | | | This PR updates golangci-lint to the latest version 1.31.0. The upgrade introduced a new check for which I've fixed or disabled most cases. Signed-off-by: kolaente <k@knt.li>
* 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>