aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Fix source typos (#16374)luzpaz2021-07-081-1/+1
| | | | | | | | | | * Fix source typos Follow up to e0296b6a6 Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby` * rm "ignore destory on `make misspell-check`" Co-authored-by: 6543 <6543@obermui.de>
* use "true" for RACE_ENABLED (#15261)65432021-06-021-3/+4
|
* fix get OS on some of the windows computers (#16007)BoYanZh2021-05-291-0/+3
|
* Add jest rootDir and test-frontend dependency (#15860)silverwind2021-05-141-1/+1
| | | | | - Define jest rootDir to limit where it looks for test files - Add missing dependency on test-frontend target so it can be ran from a clean checkout
* Use binary version of revive linter (#15739)silverwind2021-05-091-1/+4
| | | | Use the common `go get` method to install and run the revive linter, removing the useless build/lint.go and related vendor libraries.
* Make let target "clean-all" remove node_modules folder too (#15780)65432021-05-081-1/+1
| | | * Make let target "clean-all" remove node_modules folder too
* update branch in CI and docs (#15631)techknowlogick2021-05-041-1/+1
|
* Output node min version variable (#15562)Kyle D2021-04-211-1/+2
|
* Make build scripts compatible with node 12 (#15479)silverwind2021-04-151-2/+2
| | | | | | | | | | * Make build scripts compatible with node 12 "fs/promises" is not in node 12, use a more compatible way to import it. Also, lock major down versions of the image build dependencies to prevent future surprises. * add node_modules dependency
* Build go-git variants for windows (#15482)zeripath2021-04-151-0/+3
| | | | | | | | | | It appears that there are significant performance problems with the pure git backend on windows. Therefore until we can sort this out - provide go-git backend builds. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Enforce tab indentation in templates (#15289)silverwind2021-04-101-0/+1
| | | | | | | | | | | | | | | | | | * Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Stop packaging node_modules in release tarballs (#15273)silverwind2021-04-091-48/+15
| | | | | | | | | | | | | | | | | - Don't package node_modules in tarballs, they are not cross-platform anymore and npm cache should not be messed with directly. Instead, require an internet connection to rebuild the UI, which is not necessary in the general use case because prebuilt UI files are shipped in the public directory. - Simplify the fomantic build and make the target phony. We don't need anything more for something that is rarely ran. - Use regular tar again to build tarballs and add variable for excludes - Disable annoying npm update notifications Fixes: https://github.com/go-gitea/gitea/pull/14578 Fixes: https://github.com/go-gitea/gitea/pull/15256 Fixes: https://github.com/go-gitea/gitea/pull/15262 Co-authored-by: 6543 <6543@obermui.de>
* Add frontend testing, require node 12 (#15315)silverwind2021-04-081-4/+14
| | | | | | | | | | - Add basic frontend unit testing infrastructure using jest in ESM mode - Rename 'make test' to 'make test-backend' - Introduce 'make test-frontend' and 'make test' that runs both - Bump Node.js requirement to v12. v10 will be EOL in less than a month. - Convert all build-related JS files to ESM. I opted to run frontend tests run as part of the compliance pipeline because they complete fast and are not platform-specific like the golang tests.
* Fix release expansion issue (#15251)zeripath2021-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | * Fix release expansion issue Fix #14578 Signed-off-by: Andrew Thornton <art27@cantab.net> * fix cache statement too Signed-off-by: Andrew Thornton <art27@cantab.net> * and update the npmrcs Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* Introduce esbuild on webpack (#14578)Lunny Xiao2021-04-021-12/+43
| | | | | | | | | | | | | | | * Vendor node mods as cache; fix esbuild/fomantic offline build * Fix --exclude; use bsdtar for consistent globbing * Fall back to GNU tar; forward-compatible for APT 2.0 * Avoid having extd. attrs with bsdtar * Dependency and misc. optimizations * Remove extra code after esbuild-loader update Co-authored-by: Mike L <cl.jeremy@qq.com>
* Create Proper Migration Tests (#15116)zeripath2021-03-241-6/+31
| | | | | | | | | | | | | | * Create Proper Migration tests Unfortunately our testing regime has so far meant that migrations do not get proper testing. This PR begins the process of creating migration tests for this. * Add test for v176 * fix mssql drop db Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent incorrect HTML escaping in swagger.json (#14957)zeripath2021-03-111-2/+2
| | | | | | | | | | | | | | | | | | * Prevent incorrect HTML escaping in swagger.json Fix #14706 Signed-off-by: Andrew Thornton <art27@cantab.net> * oops add it to the helper Signed-off-by: Andrew Thornton <art27@cantab.net> * try again Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* build darwin on arm64 platforms (#14951)techknowlogick2021-03-101-1/+1
| | | fix #14945
* use gomod support w/ xgo (#14836)techknowlogick2021-03-011-6/+6
|
* go1.16 (#14783)techknowlogick2021-02-281-2/+2
|
* Generate man pages (#13901)65432021-02-241-1/+10
| | | | | | | | | * extend gitignore * first working draft * use docs subcomand * rm config-sheet-sheet-2-man
* build for only available darwin target (#14771)techknowlogick2021-02-221-1/+1
|
* Make release-linux archtectures via envs (#14184)Lunny Xiao2021-02-221-1/+3
|
* Update golangci-lint v1.35.2 -> v1.37.0 (#14747)65432021-02-191-1/+1
|
* remove outdated notice in makefile (#14720)techknowlogick2021-02-171-1/+0
| | | Co-authored-by: 6543 <6543@obermui.de>
* 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