434 Commits (3add683c9411018f735c0a19827354870310b9c8)

Author SHA1 Message Date
Earl Warren 2d75f86f0e
[SEMVER] 6.0.0+0-gitea-1.21.0
(cherry picked from commit 4107d99f25a9eee1eab2b52cdd579c69523366da)
(cherry picked from commit 7e097b945c0dab444485c68d4a583b9dcef6952c)
(cherry picked from commit 431edaac36e263c4b99cdab076bc402ed1ee4819)
(cherry picked from commit 51ecd89e31f8e4b1fa50422f26e5c01a1961b9a3)
(cherry picked from commit 734d7f5bc7326479d5389a71c2f1bbcc1c03c41a)
(cherry picked from commit f34e88d00cc1077cef3611f8c49406851bdd6d7e)
(cherry picked from commit cd882a75f95bc0612b5f429efd066922db3def73)
(cherry picked from commit 7dfa28db3f8c1d61ecd22e5b52b479c62a6d1ae5)
(cherry picked from commit 4bdaeeb68679e30e1f578fcee418f0c2fb7445f8)
(cherry picked from commit a0e8285914e99312fa6eab657e91e70d05e766f7)
(cherry picked from commit 72991a99f3010b59981133013983b7424605aec4)
(cherry picked from commit c99949bbf7768b6572e414e42ba40c0a110cf82e)
(cherry picked from commit d4dd7df8e7cadd0c3ac7214c0bb1245b4cb965dd)
(cherry picked from commit 1fe5c1e81e611fa30b39d8fce564bac12d6de880)
(cherry picked from commit 969b727c508e3498feefaac7fad4a5deafab6861)
(cherry picked from commit f2061a87c0a798acb00f464debba6ea149d7d8bf)
8 months ago
Earl Warren 6d8d19b391
[API] Forgejo API /api/forgejo/v1
(cherry picked from commit 20b56692693e054bb3c04b4ef12b29b0715b4530)
(cherry picked from commit 1574643a6a)

Update semantic version according to specification

(cherry picked from commit 22510f41306f9c133a7e99b61f9c38dabfd4b810)

Mise à jour de 'Makefile'

(cherry picked from commit c3d85d8409f1bb18a45659a167cf1ffee057f3b6)
(cherry picked from commit 5ea23098513c068444226af41faf9be9c4c998e6)
(cherry picked from commit ec5217b9d1b94bb04e34ce8c27eecbdc6f3a247a)
(cherry picked from commit 14f08e364b2ad7e3176b45d3ec8da5f5605b4315)
(cherry picked from commit b4465c67b8737aed9fd79a43046aa3795a298e68)

[API] [SEMVER] replace number with version

(cherry picked from commit fba48e64977a75e77c9c6cf8e3f8a679a5e7b733)
(cherry picked from commit 532ec5d8782703b62d7d02312764e50637cd016e)

[API] [SEMVER] [v1.20] less is replaced by css

(cherry picked from commit 01ca3a4f4291cf4c62df42cbd12a00638f3cdc70)
(cherry picked from commit 1d928c3ab2e1fda6082e1400d89ea96d6605ebaa)
(cherry picked from commit a39dc804cd1da86444ed709455857f069475e7db)

Conflicts:
	webpack.config.js
(cherry picked from commit adc68578b3eb41215338125edfca91804706f8a1)
(cherry picked from commit 9b8d98475fd7efcc15bf0d91b0af6ef3aff64508)
(cherry picked from commit 25161039745a63282257eded9616390241af8013)
(cherry picked from commit 18e6287963a0e1863cd08fd514a4e732a1904a68)
(cherry picked from commit e9694e67ab93ad74f7eae3152d88d95e8493e739)
(cherry picked from commit a9763edaf002c8009a2cca4115cb8b926f8cdc85)
(cherry picked from commit e2b550f4fba144f9637a212b56bfe30cac1adb3b)
(cherry picked from commit 2edac36701e8fa1ff67f87dccfa34cfc00ab66de)

[API] Forgejo API /api/forgejo/v1 (squash)

Update semver as v1.20 is entering release candidate mode

(cherry picked from commit 4995098ec3c6eee19a7ad7bc956b71c6e937c04c)
(cherry picked from commit 578ccfdd27d7a280050bdf61d497d07decf98f2f)
(cherry picked from commit 1bf6ac09520490f0a56b9b55d7836c2d8ea5d22c)
(cherry picked from commit 2fe16b2bfed62c0386d0bfe104f7dcc621d1c3be)
(cherry picked from commit 7cd9d027eec5a2b328d06a47f34545943560fe1b)
(cherry picked from commit eaed4be2ae88055a15dcc96564440c301a13ba8e)
(cherry picked from commit cc94f3115f844a0f16064e49e5eb719d33bc4441)
(cherry picked from commit d7a77e35ccfd2d0fc2ba98932296ab7354edd2db)
(cherry picked from commit cd8eb68ab7b3e2eaacf78d370c762f43cc19fd6a)
(cherry picked from commit 68487ac95f742837e7ff38df902834b6173cd9ab)
(cherry picked from commit 616dceb565456d6fac6f58b1c4de43e9d3254090)
(cherry picked from commit 545fe5975b47d2eab348a57b87c6fd4590f33442)
(cherry picked from commit c042cf8eda2dea805138bd64daa7fbe07865ed5a)
(cherry picked from commit ae5e5a7468aa66312055a26841f658574a9b0dd7)
(cherry picked from commit 8034ef5fa2648a127f8c84c572bec02a1ff6bb9f)
(cherry picked from commit aaf0293034468505449d33ab1483ae65b4175754)
(cherry picked from commit daafa8ce58e5e6077da585b13e5190856228a4a3)
(cherry picked from commit 7ca3681d3e2ed5ec1ae44364cba476d642e2b557)
(cherry picked from commit 39f72cba71ff3f9d2cbb05c88031b34933573a8c)
(cherry picked from commit 60a591713097384935ba0ac51a5cd4793f7544a8)
(cherry picked from commit 4853bd9e16bc8986ba8159349e93bc3093dc8ab9)

[API] Move forgejo api file (squash)

- Move the file to accommodate faa28b5a44

(cherry picked from commit bce89351d251bfa18c677b30bc7da80856d919fb)
(cherry picked from commit 11ae7f6e85395b287c6f4108c531aa1a81fd964c)
(cherry picked from commit 25e96cfcb28859406329090eb0c7990bea4e73eb)
8 months ago
Earl Warren 54e5a5dca2
[TESTS] add GOLANGCI_LINT_ARGS to control golangci calls
It is for instance useful with:

GOLANGCI_LINT_ARGS="--concurrency $(expr $(nproc) / 2)" make lint-backend

on a laptop where overcommitting the CPU degrades the UI performances.

(cherry picked from commit 76023319c4275645b9c8c3bd896c1e60e1d57ae7)
(cherry picked from commit 55eb05b03db15355745af83e612406baccc2b126)
(cherry picked from commit 49c84de3dff883c89a3c0115ab7e0a06aad7bb45)
(cherry picked from commit e8e26f08a6f31fc68797d6e0a927e75565abc350)
(cherry picked from commit 401aa12cac3ad50ffa21c5e141d72e1d7cfd45ff)
(cherry picked from commit 4ae8f663ad287269e1dc8bee19b3edcf41a431f8)
(cherry picked from commit 2d87e4953b93204d2da530315e03bf311cd22e10)
(cherry picked from commit e79be7d80e24effa110d4752525ab704ab6b16c0)
(cherry picked from commit 65e367399867e13a9565e2553901be60036e27d8)
8 months ago
Earl Warren 0625fc7ad8
[CI] Makefile: release: only supported platforms
(cherry picked from commit 16381262c5231f5dddf94d3dac7274366f4ca991)
(cherry picked from commit c93f41dcef679f35cb51f93b34b21cfd202ed68a)
(cherry picked from commit cf17c69487cd5ad9e5338d6dadd49c208d604ca1)
(cherry picked from commit 174b8cf3275cfb4efd483b04ad6cb6eaca069030)
(cherry picked from commit ae1b8dd441b9902b098620dbbf4e88592460f91e)
(cherry picked from commit 1b56d9049f2954b852fea1ae6e0c52076fdb4a0c)
(cherry picked from commit 6b00196175db59d2c6b71a8aa01308265c92f26c)
(cherry picked from commit 087b38c3f381cd589ccc708df102cf1594c09912)
(cherry picked from commit 70fcc63816e57f277293b10a23777c4ad796e212)
(cherry picked from commit 81e2f27426ec91c0a9ab7dd6f0eed11e360beb56)
(cherry picked from commit 9741a9960b6bef27e36e679764cfa63b5cb7066b)
8 months ago
Earl Warren b62809313f
[CI] lint-go-vet: do not include gitea-vet
(cherry picked from commit 8cbbab7fefa62c66faba72d6f8ddcec33c5e6423)
(cherry picked from commit 51113f0f29e2e7f9281ea568b8acddf6c26accb0)
(cherry picked from commit 0d061e411f60bb4533460e1558646cdbc6a45aae)
(cherry picked from commit 1eb4e7e691bf496b152916e11b991b16786752e2)
(cherry picked from commit 3c3760f3b608303cc11e1cc3fea574e8166aeddc)
(cherry picked from commit c11907373dfb8df7f974c726f46aee20727a9d3e)
(cherry picked from commit d990fcf4469df8a4edede97e2c0980536ca98d86)
(cherry picked from commit 62fd8a0b399802ca76bee0140f35357b2ddfd762)
(cherry picked from commit 0663a2534101c0c6ed2fefd2eb84ce7f89bea4af)
(cherry picked from commit c20d4386e530b56d9342a1403c682e86b5d25ada)
(cherry picked from commit 5981040a197e002e6235194e92f4bad140572b49)
8 months ago
Earl Warren e585db9a97
[CI] Forgejo Actions based release process
Refs: https://codeberg.org/forgejo/website/pulls/230
(cherry picked from commit 87d56bf6c73d726dae8aafbc7e147969f1899931)

[CI] Forgejo Actions based release process (squash)

base64 -w0 to avoid wrapping when the doer name is long as it creates
a broken config.json

(cherry picked from commit 9efdc27e49bdfb3e62401baf27b224385f9f3e5e)

[CI] Forgejo Actions based release process (squash) generate .xz files and sources

Generate .xz files
Check .sha256
Generate the source tarbal

(cherry picked from commit 7afec520c4b1032d7e67a05a41e4e2913bcd9312)

[CI] Forgejo Actions based release process (squash) release notes

(cherry picked from commit d8f4f4807b28297b318d2f555a76d0efef762cf7)

[CI] Forgejo Actions based release process (squash) publish and sign release

(cherry picked from commit a52778c74785fe57cdee3b64b4c6c8a326471532)
(cherry picked from commit cf2ec6274094ac7aebda71d54c64581f528df00a)

[CI] Forgejo Actions based release process (squash) version

use Actions environment variables in Makefile (#25319) (#25318)

uses Actions variable to determine the version. But Forgejo builds
happen in a container where they are not available. Do not use them.

Also verify the version of the binary is as expected for sanity check.

(cherry picked from commit 6decf111a132a869f9e5c6f4d20e368b8f74309f)
(cherry picked from commit 206d0b3886b2d56b585bf552e53d952b35f07284)

[CI] read STORED_VERSION_FILE if available

(cherry picked from commit af74085ebf51c91a51db865a66667fca511838d5)

[CI] backward compatible executable compilation

Add a new static-executable target to use in Dockerfiles and restore
the $(EXECUTABLE) target to what it was before to for backward
compatibility.

The release process now builds static executables instead of
dynamically linked ones which makes them more portable. It changes the
requirements at compile time and is not backward compatible. In
particular it may break packaging that rely on the target that
currently creates a dynamically linked executable.

(cherry picked from commit 84d02a174a4398b1f8ee62e08db5483a9859650f)
(cherry picked from commit 854be47328cc0283119dfb78f9ba0b8306c85f75)

[CI] Forgejo Actions based release process (squash) doc / ca / verbosity

- Document workflow
- Increase verbosity if VERBOSE=true
- Download the Certificate Authority if behind the VPN

(cherry picked from commit 168d5d586904835762d213b2b8815b458a38c78f)
(cherry picked from commit 8756c9a72a40830441124256b7382f900a1052f8)
(cherry picked from commit 2dad7ef20f3bf9ebe2425e2e28b66a4ca21c6786)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit 5531d01f1981df665f5b8f642e9241e8ea4f4578)

[CI] Forgejo Actions based release process (squash) add assets sources-tarbal

bindata.go is a file, not a directory

Refs: https://codeberg.org/forgejo/forgejo/issues/1115
(cherry picked from commit bd88a4477817be34ea86ebb2f460b9fe8ab5f1b7)
(cherry picked from commit b408085138c578dfaacafbd4b7719ca926456855)

[CI] Forgejo Actions based release process (squash) public/assets moved

(cherry picked from commit d8c921d5a643ed05f2935348531996fe4d08c654)
(cherry picked from commit f29e50b1a09b1a22fc2dbdb77e9a1def1196175b)

[CI] Fix release notes link

- Use substitution to replace all dots with dashes.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1163

(cherry picked from commit 96783728f53a072915cace392aa269adfe9a5c73)
(cherry picked from commit c8d8bf8996beb650cd86cafb110e85e1e05917a0)

[CI] pin go v1.20 for testing

Refs: https://codeberg.org/forgejo/forgejo/issues/1228
(cherry picked from commit fd4b5a013ee0f31453b623d12001a8b810cd7ebc)
(cherry picked from commit 00bb15f57f2ae5a11abc8b044ed99dc949e812a7)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	see https://codeberg.org/forgejo/forgejo/pulls/1303
(cherry picked from commit 6e2be54a6d95412ce770d4bab1a39c77591f44dc)
(cherry picked from commit 346c418b4a8c0e1f8c9aace44b00373a4bf76732)
(cherry picked from commit 49061f8422cb6aa9ddc14edb507f50477624eb7a)
(cherry picked from commit 8229d59b7e1ba61959de6ecd95d9dd49bc2436dc)
(cherry picked from commit 70d45d919309d8127551c8ad44538a730b795638)

[CI] Forgejo Actions based release process (squash) need node 18

(cherry picked from commit 722b1f45902ecca3179a92700a2f5c1080422a04)
(cherry picked from commit a91d786169fb4694aed4af68792437a0a67de3fa)

[CI] Forgejo Actions based release process (squash) fix indentation

(cherry picked from commit fbdf9d6abb88fd5def3d0ced488a4dd72655d433)
(cherry picked from commit 2deff90a13397339796ac5a94d63b0d8cd9760a9)
(cherry picked from commit 5710a27fda58093f0db1605585e730c314b933f5)

[CI] Forgejo Actions based release process (squash) FQIN for docker

Refs: https://codeberg.org/forgejo/forgejo/issues/1600
(cherry picked from commit f63d38deb6a9933ce996a61a099f4b79e9171581)

[CI] Forgejo Actions based release process (squash) use forgejo-curl.sh

(cherry picked from commit c0c3ef506fa500cb9626034c5e00913b3c31e08c)
(cherry picked from commit 933ca7ec5dcab55c8593dee4a6cd13281502c41e)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	https://codeberg.org/forgejo/forgejo/pulls/1691
(cherry picked from commit 1068e48805de9d7464b41f32e1c5567d3747239a)

[CI] Forgejo Actions based release process (squash) size optimization

(cherry picked from commit 3c653ff7428dbf898a5131b5c817ce3b13ec0591)
(cherry picked from commit 398567fc0cf9edd0be49541339800af985e8b1b6)
8 months ago
Loïc Dachary 2a8b08ee4f
[CI] implementation: publish forgejo- binaries instead of gitea-
(cherry picked from commit 6d910daafb28b79402b8190fa749f4ff18991505)
(cherry picked from commit d447861cc911aa89539cbbcdbbf0e68d0bc23e53)
(cherry picked from commit dc6e9d8799)
(cherry picked from commit ef232fa20c99c6c52599025967a5af2f5839bdce)
(cherry picked from commit 290c55517a84f6e8b80459372b9b63ec19cadcb4)
(cherry picked from commit db48af1784e94851c066845324c3e680e79ab7c3)
(cherry picked from commit 85f33237a2f5da88ec2fcab76ea91ee3cec56065)
(cherry picked from commit 76899ee33e8196c66f882fca5facf5268c8fabf8)
(cherry picked from commit 148b3ee9cb03aa614b59ab98d2d8c11f343d38d1)
(cherry picked from commit 1f6ad8f465819cc6adb8061845822398a33e14e1)
(cherry picked from commit c330afdba3354ff59591bd07046b6993bfeea777)
(cherry picked from commit b1f87075a79c8e0d1a8626958f90bfee4d003de1)
(cherry picked from commit 7da40992cc82d719094a748339c385fbc1251afe)
(cherry picked from commit 7ab19ff5e528b9e1ef53e95639022facca70466e)
(cherry picked from commit e61e44921bbabc7ba12da51afde1c6fe8203679b)
(cherry picked from commit 83646119fb8af975a114601ee7bbaf7c5d25f93f)
(cherry picked from commit 20cf748e61f35378745629dcb38b459818c8ad52)
(cherry picked from commit 0a99919cec90dc1374c67199a0bbb90e7f8c7525)
(cherry picked from commit 21215222a6d036551dca0b54a09c388845c3565f)
(cherry picked from commit 0f6c5658d77fe47d4c67b327190f88af829905da)
(cherry picked from commit 1752e43d3c0d71533680d2dcbcbb056d0c91371e)
(cherry picked from commit 2332080929c9eb65d512956773bf7ac821fa6736)
(cherry picked from commit 590aabf2a2a47f4a5a53a9d0b8b12486f5998400)
(cherry picked from commit 87d8b7b315c3e25bd3fcf9dc9c1d359bcd107281)
(cherry picked from commit ff37de38be04b8c1ca6f04b4ef5566c9f9a125ad)
(cherry picked from commit cee32c9e7ab58af6cb07109df4b88420c30c6156)
(cherry picked from commit 39faade524215d5527c5d24e90a9be62aa40f422)
(cherry picked from commit 0e5ca477b6e7ae926cd32454a6ed372b83626b34)
(cherry picked from commit 70e2730f7b2efe4c2ee9ef047583bf9ee5eed409)
(cherry picked from commit 2ad4003944e0d32d1e45b9276316e189f9b5b176)
(cherry picked from commit 2429de9e87e3fdbfa2df8741c9400e9f056ef124)
(cherry picked from commit c133915fc1a4eb8aa1e4766e720e47de14db0d61)
(cherry picked from commit c607dcaf9f01e454921e07b758bdde1c4dba5504)
(cherry picked from commit 00f006637f659bd617d05d1017be7bd4b78e618b)
(cherry picked from commit 0de6646475195e0cf210781c98b8fcede010b94d)
(cherry picked from commit b05e83bb1e45e67d96f0b4b138ffe2df8329e01d)
(cherry picked from commit cb71f139f081c14d17ee904931ab64ccd2199c20)
8 months ago
silverwind 1ccdb546f0
Install poetry dependencies with --no-root (#27919)
Poetry 1.7.0 or higher will print a warning otherwise, see discussions:

https://github.com/python-poetry/poetry/pull/8369
https://github.com/python-poetry/poetry/issues/1132

> --no-root Do not install the root package (the current project).
8 months ago
silverwind ce83609ff6
Upgrade to golangci-lint@v1.55.0 (#27756)
https://github.com/golangci/golangci-lint/releases/tag/v1.55.0
8 months ago
techknowlogick 60fce1568e
Remove network call on `make clean` (#27689)
fix #27653

credit to silverwind for finding issue
8 months ago
Sergey Zolotarev 6acce16ee3
Remove .exe suffix when cross-compiling on Windows (#27448)
When compiling GItea for Linux on Windows, you get a `gitea.exe` file as
output, but because it's a Linux executable, the `.exe` extension is
unnecessary.

This PR adds a check for `GOOS` environment variable in addition to
`OS`.
9 months ago
silverwind e94f9fcafd
Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)
- MySQL 5.7 support and testing is dropped
- MySQL tests now execute against 8.1, up from 5.7 and 8.0
- PostgreSQL 10 and 11 support ist dropped
- PostgreSQL tests now execute against 16, up from 15
- MSSQL 2008 support is dropped
- MSSQL tests now run against locked 2022 version

Fixes: https://github.com/go-gitea/gitea/issues/25657

Ref: https://endoflife.date/mysql
Ref: https://endoflife.date/postgresql
Ref: https://endoflife.date/mssqlserver

## ⚠️ BREAKING ⚠️

Support for MySQL 5.7, PostgreSQL 10 and 11, and MSSQL 2008 is dropped.
You are encouraged to upgrade to supported versions.

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
9 months ago
silverwind a101dbaa79
Update JS and Poetry dependencies and eslint (#27200)
- Update all JS and Poetry dependencies
- Remove deprecated `eslint-plugin-custom-elements` and replace it with
rules from `eslint-plugin-wc`
- Add a convenience `make update` to update both js and py dependencies
- Tested markdown toolbar, swagger and citation
9 months ago
silverwind 3c0c279658
Add `yamllint` (#26965)
So that https://github.com/go-gitea/gitea/pull/26964 does not happen
again. Merge this after that PR. Config is based on
[node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml).

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
10 months ago
silverwind 3db3f5daae
Update tool dependencies (#26607)
- Updated all tool dependencies to latest versions
- Add Makefile to `swagger` files because it specifies `go-swagger`
version
- Fix lint
10 months ago
techknowlogick 653e77fd22
bump go to 1.21 (#26608)
Co-authored-by: Giteabot <teabot@gitea.io>
10 months ago
silverwind c6975e583a
Update govulncheck, fix typo (#26168)
- Update govulncheck to latest version
- Fix typo in variable name
11 months ago
John Olheiser bd4c7ce578
Docusaurus-ify (#26051)
This PR cleans up the docs in a way to make them simpler to ingest by
our [docs repo](https://gitea.com/gitea/gitea-docusaurus).

1. It includes all of the sed invocations our ingestion did, removing
the need to do it at build time.
2. It replaces the shortcode variable replacement method with
`@variable@` style, simply for easier sed invocations when required.
3. It removes unused files and moves the docs up a level as cleanup.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
11 months ago
wxiaoguang faa28b5a44
Move public asset files to the proper directory (#25907)
Move `public/*` to `public/assets/*`

Some old PRs (like #15219) introduced inconsistent directory system.

For example: why the local directory "public" is accessed by
`http://site/assets`? How to serve the ".well-known" files properly in
the public directory?

For convention rules, the "public" directory is widely used for the
website's root directory. It shouldn't be an exception for Gitea.

So, this PR makes the things consistent:

* `http://site/assets/foo` means `{CustomPath}/public/assets/foo`.
* `{CustomPath}/public/.well-known` and `{CustomPath}/public/robots.txt`
can be used in the future.

This PR is also a prerequisite for a clear solution for:
* #21942
* #25892 
* discourse.gitea.io: [.well-known path serving custom files behind
proxy?](https://discourse.gitea.io/t/well-known-path-serving-custom-files-behind-proxy/5445/1)

This PR is breaking for users who have custom "public" files (CSS/JS).
After getting approvals, I will update the documents.

----

## ⚠️ BREAKING ⚠️

If you have files in your "custom/public/" folder, please move them to
"custom/public/assets/".

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago
silverwind 887a683af9
Update tool dependencies, lock govulncheck and actionlint (#25655)
- Update all tool dependencies
- Lock `govulncheck` and `actionlint` to their latest tags

---------

Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months ago
silverwind fdf71460f9
Fix `lint-swagger` action (#25593)
- Add detection for swagger changes and run `lint-swagger` on it
- Remove `lint-swagger` from `lint-frontend`
- Remove `lint-md` from `lint-frontend`
1 year ago
silverwind b943318617
Update JS dependencies and misc tweaks (#25540)
- Update all JS dependencies
- Enable `declaration-property-unit-disallowed-list` to forbid `em` on
`line-height`
- Rename dependency update targets to `update-js` and `update-py` and
document them
- Remove margin on Asciicast viewer
- Tested Swagger, Katex, Asciicast

<img width="1243" alt="Screenshot 2023-06-27 at 19 51 05"
src="https://github.com/go-gitea/gitea/assets/115237/2d2722a0-2aa7-4f4c-b8bd-17e1f3637b78">
1 year ago
silverwind 02ef14bea2
Add `make poetry-update`, upgrade `djlint` (#25399)
[updates](https://github.com/silverwind/updates) now supports poetry as
well so we can use it for a new `make poetry-update` to update all
poetry dependencies.
1 year ago
John Olheiser 2e65c223dc
Gitea version in Makefile (#25456)
As title, this is how it was inferred before

e24f651c86/Makefile (L83-L84)

We moved to actions, however `GITEA_VERSION` should still work to use
`VERSION`

Signed-off-by: jolheiser <john.olheiser@gmail.com>
1 year ago
techknowlogick feda506321
Use Actions git context instead of dynamically created buildkit one (#25381)
The [docker/build-push-action@v2
action](https://github.com/docker/build-push-action) by default ignores
the checkout created using the actions/checkout@v2 action. When you pass
a git build context to docker build, it wouldn't include the .git
directory.

By passing `context: .` to the build step then it'll use the Actions git
context which includes the git fetch from the earlier step.
1 year ago
a1012112796 f98ffff64a
fix a nit error output in Makefile (#25360)
fix ``make: write error: stdout``

ref:
https://stackoverflow.com/questions/70671525/write-error-stdout-when-calling-make-from-makefile
1 year ago
techknowlogick ccc19eda0b
use Actions environment variables in Makefile (#25319) 1 year ago
techknowlogick 0ab9b7f426
Build nightly binaries with Actions (#25308)
Co-authored-by: silverwind <me@silverwind.io>
1 year ago
silverwind e24f651c86
Add template linting via djlint (#25212)
So I found this [linter](https://github.com/Riverside-Healthcare/djlint)
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.

Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.

- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well).
1 year ago
silverwind 50bd7d0b24
Remove the service worker (#25010)
It's been disabled by default since 1.17
(https://github.com/go-gitea/gitea/pull/18914), and it never really
delivered any benefit except being another cache layer that has its own
unsolved invalidation issues. HTTP cache works, we don't need two cache
layers at the browser for assets.

## ⚠️ BREAKING

You can remove the config `[ui].USE_SERVICE_WORKER` from your `app.ini`
now.
1 year ago
Lunny Xiao 93c6a9a652
Use file filters action instead of Github's files filter (#24877)
Inspired by
https://github.com/go-gitea/gitea/pull/24530#issuecomment-1558815301

This PR use a file filter action to do different CI jobs according
changed files types. All types are defined in
`.github/file-filters.yml`. Now there are 4 types, `docs`, `backend`,
`frontend` and `build`. Then if a PR only changed docs files, those CI
jobs which passed the conditions will run, and other types are also like
this.

---------

Co-authored-by: silverwind <me@silverwind.io>
1 year ago
silverwind 1cf4d46bb1
Reduce verbosity of dev commands (#24917)
### Before

```
$ make watch
bash build/watch.sh
make[1]: Entering directory '/Users/silverwind/git/gitea'
make[1]: Entering directory '/Users/silverwind/git/gitea'
GITEA_RUN_MODE=dev go run github.com/cosmtrek/air@v1.43.0 -c .air.toml
rm -rf public/js public/css public/fonts public/img/webpack public/serviceworker.js
NODE_ENV=development npx webpack --watch --progress
```

### After

```
$ make watch
GITEA_RUN_MODE=dev go run github.com/cosmtrek/air@v1.43.0 -c .air.toml
NODE_ENV=development npx webpack --watch --progress
```
1 year ago
silverwind a9d417341c
Run stylelint on .vue files (#24865)
- Run stylelint on .vue files
- Fix discovered issues
- Suppress warning spam from `declaration-strict-value` rule

Co-authored-by: Giteabot <teabot@gitea.io>
1 year ago
silverwind 6c8b680f91
GitHub Actions cleanups (#24620)
- Remove actions name where command is descriptive enough
- Use kebab-case instead of snake-case for step names
- Use shorter job names because to make PR checks more readable
- Remove duplicate `checks-backend`

---------

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
1 year ago
riastradh 377e0139b0
Makefile: Use portable !, not GNUish -not, with find(1). (#24565)
fix https://github.com/go-gitea/gitea/issues/24564

Co-authored-by: Taylor R Campbell <campbell+gitea@mumble.net>
1 year ago
techknowlogick 017a156553
Unify nightly naming across binaries and docker images (#24116)
Proposal found here: https://github.com/go-gitea/gitea/issues/23654

TODO: make non-breaking (can we publish docker image using dev and
nightly prefix? at same time). if anyone has advice please comment :)

If this PR is merged, then I can add redirects to the downloads site.
1 year ago
silverwind a319da0688
Replace whitespace inside template parens during make fmt (#24293)
Remove space/tab after `(` and before `)` in templates. Only two
violations it seems.
1 year ago
silverwind 8dc6eabbc0
Update go tool dependencies, restructure lint targets (#24239)
- Update all tool dependencies to latest tag
- Remove unused errcheck, it is part of golangci-lint
- Include main.go in air
- Enable wastedassign again now that it's
[generics-compatible](https://github.com/golangci/golangci-lint/pull/3689)
- Restructured lint targets to new `lint-*` namespace
1 year ago
silverwind 4b1c6cd8e5
Make HAS_GO a simply expanded variable (#24169)
Avoid recursive expansion on this variable and simplify the value.
[Reference](https://www.gnu.org/software/make/manual/html_node/Setting.html).
1 year ago
silverwind 96fb7506db
Introduce lint-md and compliance-docs pipeline (#24021)
- Add new Make target `lint-md`
- Add new Drone pipeline `compliance-docs`
- Add `*.md` to docs exclusion/inclusion
- Consistently quote `path.include` and `path.exclude` statements in
YAML
1 year ago
John Olheiser 797babbfcb
Remove -v from vulncheck (#23953)
We should think about locking this dep, but for now this should get
builds going again.
1 year ago
wxiaoguang 5b5f7b756b
Clean some legacy files and move some build files (#23699)
* Clean the "tools" directory. The "tools" directory contains only two
files, move them.
* The "external_renderer.go" works like "cat" command to echo Stdin to
Stdout , to help testing.
* The `// gobuild: external_renderer` is incorrect, there should be no
space: `//gobuild: external_renderer`
* The `fmt.Print(os.Args[1])` is not a well-defined behavior, and it's
never used.
* The "watch.sh" is for "make watch", it's somewhat related to "build"
* After this PR, there is no "tools" directory, the project root
directory looks slightly simpler than before.
* Remove the legacy "contrib/autoboot.sh", there is no
"gogs_supervisord.sh"
* Remove the legacy "contrib/mysql.sql", it's never mentioned anywhere.
* Remove the legacy "contrib/pr/checkout.go", it has been broken for
long time, and it introduces unnecessary dependencies of the main code
base.
1 year ago
techknowlogick c5cfc08555
ensure go/bin path exists when copying hugo bin into it (#23692)
follow up of https://github.com/go-gitea/gitea/pull/23686

path does not exist during static pipeline, and fails out (example:
https://drone.gitea.io/go-gitea/gitea/70587/1/5 )
1 year ago
Yarden Shoham aa3c673621
Add `deps-docs` command to makefile (#23686)
Refactored `deps-docs` out of `docs` because #23629 broke Gitpod's docs
setup (which grepped to get the hugo install command).

Now `make deps` really installs everything to develop (includes `docs`).
1 year ago
Lunny Xiao e8433b7fe6
Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629)
- **Installation**: includes how to install Gitea and related other
tools, also includes upgrade Gitea
- **Administration**: includes how to configure Gitea, customize Gitea
and manage Gitea instance out of Gitea admin UI
- **Usage**: includes how to use Gitea's functionalities. A sub
documentation is about packages, in future we could also include CI/CD
and others.
- **Development**: includes how to integrate with Gitea's API, how to
develop new features within Gitea
- **Contributing**: includes how to contribute code to Gitea
repositories.

After this is merged, I think we can have a sub-documentation of `Usage`
part named `Actions` to describe how to use Gitea actions

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1 year ago
silverwind 847f854154
Enable color for consistency checks diffs (#23563)
Drone can display terminal colors, so force-enable it to make diffs more
readable on it.

Co-authored-by: delvh <leon@kske.dev>
1 year ago
silverwind 202803fc69
Replace Less with CSS (#23481)
Ran most of the Less files through the Less compiler and Prettier and
then followed up with a round of manual fixes.

The Less compiler had unfortunately stripped all `//` style comments
that I had to restore (It did preserve `/* */` comments). Other fixes
include duplicate selector removal which were revealed after the
transpilation and which weren't caught by stylelint before but now are.

Fixes: https://github.com/go-gitea/gitea/issues/15565
1 year ago
techknowlogick 32204fcf8b
test_env: hardcode major go version in use (#23464)
hardcode the version of test_env we use in docker, so that we can use
different major versions of golang between versions of Gitea

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
1 year ago
John Olheiser f92e0a4018
Split CI pipelines (#23385)
- This PR attempts to split our various DB tests into separate
pipelines.
- It splits up some of the extra feature-related tests rather than
having most of them in the MySQL test.
- It disables the race detector for some of the pipelines as well, as it
can cause slower runs and is mostly redundant when the pipelines just
swap DBs.
- It builds without SQLite support for any of the non-SQLite pipelines.
- It moves the e2e test to using SQLite rather than PG (partially
because I moved the minio tests to PG and that mucked up the test
config, and partially because it avoids another running service)
- It splits up the `go mod download` task in the Makefile from the tool
installation, as the tools are only needed in the compliance pipeline.
(Arguably even some of the tools aren't needed there, but that could be
a follow-up PR)
- SQLite is now the only arm64 pipeline, moving PG back to amd64 which
can leverage autoscaler

Should resolve #22010 - one thing that wasn't changed here but is
mentioned in that issue, unit tests are needed in the same pipeline as
an integration test in order to form a complete coverage report (at
least as far as I could tell), so for now it remains in a pipeline with
a DB integration test.

Please let me know if I've inadvertently changed something that was how
it was on purpose.

---

I will say sometimes it's hard to pin down the average time, as a
pipeline could be waiting for a runner for X minutes and that brings the
total up by X minutes as well, but overall this does seem to be faster
on average.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
wxiaoguang 303b72c2d1
Fix Fomantic UI's `touchstart` fastclick, always use `click` for click events (#23065)
Using `touchstart` for `click` events is a black magic for mobile
browsers (Google: `fastclick`).

However, it causes many UX problems if the fastclick is used without
careful design.

Fomantic UI uses this fastclick for its `dimmer` and `dropdown`, it
makes mobile users feel strange when they "touch" the dropdown menu.


This PR uses a simple patch to fix that behavior. Then the Fomantic
dropdown only uses `click` for click events.

This PR is simple enough and won't cause hidden bugs even if the patch
doesn't work. In the future, if there are more patches for Fomantic UI,
the patches could be placed in a directory like
`web_src/fomantic/patches/001-fix-click-touchstart`, etc.


![image](https://user-images.githubusercontent.com/2114189/220551915-bd28e8cc-507f-43c7-bb4a-b24f7ff3934d.png)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago