* 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>
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
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
* Add test for cross compile
* Fix drone
* Fix drone
* Also prevent CC environment not to generate
Co-authored-by: zeripath <art27@cantab.net>
* 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>
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>
* 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>
- 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
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>
- 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>
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>
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
- 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>
* 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
- 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>
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>
* 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>
- 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>
* Check if go exists before generating the GOPATH
* Move export PATH into Go protected section
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* 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>
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
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>
* 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>
- 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>
* 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>
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.
* 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
* 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
* 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>
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.