Commit graph

440 commits

Author SHA1 Message Date
Earl Warren fdf950398b
[SEMVER] 6.0.3+0-gitea-1.21.3 2023-12-22 11:56:45 +01:00
Earl Warren ce3d6b60bd
[SEMVER] 6.0.2+0-gitea-1.21.2 2023-12-12 17:04:38 +01:00
Earl Warren 89014eb4fe
[SEMVER] 6.0.1+0-gitea-1.21.2 2023-12-08 13:59:19 +01:00
Gusted 36cc9a3aed
[BRANDING] Replace branding in Swagger
- "Gitea" is automatically being determined in Swagger and cannot be
overridden, therefor we override it after `swagger generate spec` is run.
- Resolves https://codeberg.org/forgejo/forgejo/issues/226

(cherry picked from commit 0b45380765)

[BRANDING] Change Swagger title to Forgejo API

(cherry picked from commit 79f6a70b53)
(cherry picked from commit 6cd47afe33)
(cherry picked from commit a7ae2e4c09)
(cherry picked from commit 59f837e466)
(cherry picked from commit c1c3d1f0e6)
(cherry picked from commit 4b088713fb)
(cherry picked from commit 3df1d21371)
(cherry picked from commit a4a5fdbde4)
(cherry picked from commit 57aa9ed710)
(cherry picked from commit 948b49bf94)
(cherry picked from commit be4929ab6a)
(cherry picked from commit 9ecb507457)

Conflicts:
	templates/swagger/ui.tmpl
(cherry picked from commit 8e57e68863)
(cherry picked from commit f0b3f621e3)
(cherry picked from commit 5b0a6d093e)
(cherry picked from commit 2e0f6b5de8)
(cherry picked from commit bb08076f5c)
(cherry picked from commit 5c9360e38a)
(cherry picked from commit 2f27756148)
(cherry picked from commit 6fce7eeb51)
(cherry picked from commit 8d27e7bebd)
(cherry picked from commit fda2ee2aae)
(cherry picked from commit fe0489a4d8)
(cherry picked from commit fe9479b357)
(cherry picked from commit 1deadb2f35)
(cherry picked from commit d1cb84b2f2)
(cherry picked from commit 9de15d49f8)
(cherry picked from commit 461fbe219c)
(cherry picked from commit f39bf3ba5b)
(cherry picked from commit b3f31c2f7b)
(cherry picked from commit b9f493c139)
(cherry picked from commit 83781b1641)
(cherry picked from commit 4438ee0434)
(cherry picked from commit 56b6b36833)
(cherry picked from commit d42aa19f27)
(cherry picked from commit 4b7eb6a93b)
(cherry picked from commit 9d17e95951)
(cherry picked from commit 31d3f4bb01)
(cherry picked from commit c428c3f14c)
(cherry picked from commit 07fbe2ba69)

Conflicts:
	templates/swagger/v1_json.tmpl
	remove trailing dot
2023-11-22 17:14:07 +01:00
Earl Warren b0afde6d64
Revert "[BRANDING] Replace branding in Swagger"
This reverts commit 07fbe2ba69.
2023-11-22 17:12:37 +01:00
Earl Warren 8869464c1d
Merge branch 'rebase-v1.21/forgejo-branding' into wip-v1.21-forgejo 2023-11-13 16:47:18 +01:00
Loïc Dachary b5b73fe667
[BRANDING] add forgejo target to Makefile
The gitea target is kept as is, for the sake of compatibility with
build systems that rely on it. The forgejo target creates a hard link
with forgejo.

(cherry picked from commit ce156c7cb4)
(cherry picked from commit b2cb232825)
(cherry picked from commit 85543c22bd)
(cherry picked from commit 302955a20d)
(cherry picked from commit 4b1be0858e)
(cherry picked from commit afed1a6e20)
(cherry picked from commit e81304bcd1)
(cherry picked from commit 479cd51a03)
(cherry picked from commit 8baab7c0c1)
(cherry picked from commit 5d25ad9f09)
(cherry picked from commit f36942789f)
(cherry picked from commit 9abfbae8a0)
(cherry picked from commit 079e0efb01)
(cherry picked from commit 9c8202f438)
(cherry picked from commit 6c33975513)
(cherry picked from commit 82d60ad058)
(cherry picked from commit b4593e0668)
(cherry picked from commit 3172c99a08)
2023-11-13 14:01:11 +01:00
Gusted 07fbe2ba69
[BRANDING] Replace branding in Swagger
- "Gitea" is automatically being determined in Swagger and cannot be
overridden, therefor we override it after `swagger generate spec` is run.
- Resolves https://codeberg.org/forgejo/forgejo/issues/226

(cherry picked from commit 0b45380765)

[BRANDING] Change Swagger title to Forgejo API

(cherry picked from commit 79f6a70b53)
(cherry picked from commit 6cd47afe33)
(cherry picked from commit a7ae2e4c09)
(cherry picked from commit 59f837e466)
(cherry picked from commit c1c3d1f0e6)
(cherry picked from commit 4b088713fb)
(cherry picked from commit 3df1d21371)
(cherry picked from commit a4a5fdbde4)
(cherry picked from commit 57aa9ed710)
(cherry picked from commit 948b49bf94)
(cherry picked from commit be4929ab6a)
(cherry picked from commit 9ecb507457)

Conflicts:
	templates/swagger/ui.tmpl
(cherry picked from commit 8e57e68863)
(cherry picked from commit f0b3f621e3)
(cherry picked from commit 5b0a6d093e)
(cherry picked from commit 2e0f6b5de8)
(cherry picked from commit bb08076f5c)
(cherry picked from commit 5c9360e38a)
(cherry picked from commit 2f27756148)
(cherry picked from commit 6fce7eeb51)
(cherry picked from commit 8d27e7bebd)
(cherry picked from commit fda2ee2aae)
(cherry picked from commit fe0489a4d8)
(cherry picked from commit fe9479b357)
(cherry picked from commit 1deadb2f35)
(cherry picked from commit d1cb84b2f2)
(cherry picked from commit 9de15d49f8)
(cherry picked from commit 461fbe219c)
(cherry picked from commit f39bf3ba5b)
(cherry picked from commit b3f31c2f7b)
(cherry picked from commit b9f493c139)
(cherry picked from commit 83781b1641)
(cherry picked from commit 4438ee0434)
(cherry picked from commit 56b6b36833)
(cherry picked from commit d42aa19f27)
(cherry picked from commit 4b7eb6a93b)
(cherry picked from commit 9d17e95951)
(cherry picked from commit 31d3f4bb01)
(cherry picked from commit c428c3f14c)
2023-11-13 13:58:17 +01:00
fnetx ad366ebfdd
[I18N] Makefile + gitignore
(cherry picked from commit 68c744111d)
(cherry picked from commit 30d7c4a899)
(cherry picked from commit 220ac0a6d3)
(cherry picked from commit 21cb16af95)
(cherry picked from commit 41a9373e3e)
(cherry picked from commit 69030f7803)
(cherry picked from commit 92c4d4d2e6)
(cherry picked from commit c1bfd1730e)
(cherry picked from commit 18a9a9e73c)
(cherry picked from commit 07f9882073)
(cherry picked from commit e71b8061d4)
(cherry picked from commit 225b30f1f7)
(cherry picked from commit fdf9891003)
(cherry picked from commit df2f413476)
(cherry picked from commit b01c755aaf)
(cherry picked from commit acd4275acb)

[I18N] Add Locale merger script (squash: compile on windows)

Fixes: https://codeberg.org/forgejo/forgejo/issues/798
(cherry picked from commit b47b205e85)
(cherry picked from commit 1521f0bfd6)
(cherry picked from commit 7f988de42c)
(cherry picked from commit d26b491312)
(cherry picked from commit 60136bac66)
(cherry picked from commit 915bb4b354)
(cherry picked from commit 3e1b42a8ca)
(cherry picked from commit 18d8fc075f)
(cherry picked from commit 1d9f95687b)
(cherry picked from commit e49da1a90d)
(cherry picked from commit a182baed8a)
(cherry picked from commit 3e48a87c00)
(cherry picked from commit e0bb406c14)
(cherry picked from commit e45ec160f9)
(cherry picked from commit e89ec6d008)
(cherry picked from commit 80eb392c5c)
(cherry picked from commit d0bce1b613)
(cherry picked from commit 8debcf86ea)
(cherry picked from commit a9bc3c54d7)
(cherry picked from commit d5595e4156)
(cherry picked from commit 7b7f162084)
(cherry picked from commit fd6810ec8c)
(cherry picked from commit 0a0801c0a2)
(cherry picked from commit d1567e766a)
2023-11-13 13:57:47 +01:00
Earl Warren a411a377b0
[SEMVER] store SemVer in ForgejoSemVer after a database upgrade
(cherry picked from commit b7fe7cf401)
(cherry picked from commit cf339eed4f)
(cherry picked from commit 4f3a16168b)
(cherry picked from commit 6f5bbc53fc)
(cherry picked from commit aca42b422e)
(cherry picked from commit 5a7f7580e5)
(cherry picked from commit 06c383c807)
(cherry picked from commit fe831dcb53)
(cherry picked from commit cd12cd0dbc)
(cherry picked from commit cc79163703)
(cherry picked from commit f3ad9d345f)
(cherry picked from commit 1a01baaa0f)
(cherry picked from commit 21123afcfd)
(cherry picked from commit fdfbda0f9b)
(cherry picked from commit 19eb6b5774)
2023-11-13 12:33:48 +01:00
Earl Warren 85340c074f
[SEMVER] 6.0.0+0-gitea-1.21.0
(cherry picked from commit 4107d99f25)
(cherry picked from commit 7e097b945c)
(cherry picked from commit 431edaac36)
(cherry picked from commit 51ecd89e31)
(cherry picked from commit 734d7f5bc7)
(cherry picked from commit f34e88d00c)
(cherry picked from commit cd882a75f9)
(cherry picked from commit 7dfa28db3f)
(cherry picked from commit 4bdaeeb686)
(cherry picked from commit a0e8285914)
(cherry picked from commit 72991a99f3)
(cherry picked from commit c99949bbf7)
(cherry picked from commit d4dd7df8e7)
(cherry picked from commit c0b69434e0)
(cherry picked from commit 049f2f083d)
(cherry picked from commit dd55ad9106)
(cherry picked from commit e1d5e9c58f)
(cherry picked from commit a88cfec09d)
2023-11-13 12:33:48 +01:00
Earl Warren 8b4da94996
[API] Forgejo API /api/forgejo/v1
(cherry picked from commit 20b5669269)
(cherry picked from commit 1574643a6a)

Update semantic version according to specification

(cherry picked from commit 22510f4130)

Mise à jour de 'Makefile'

(cherry picked from commit c3d85d8409)
(cherry picked from commit 5ea2309851)
(cherry picked from commit ec5217b9d1)
(cherry picked from commit 14f08e364b)
(cherry picked from commit b4465c67b8)

[API] [SEMVER] replace number with version

(cherry picked from commit fba48e6497)
(cherry picked from commit 532ec5d878)

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

(cherry picked from commit 01ca3a4f42)
(cherry picked from commit 1d928c3ab2)
(cherry picked from commit a39dc804cd)

Conflicts:
	webpack.config.js
(cherry picked from commit adc68578b3)
(cherry picked from commit 9b8d98475f)
(cherry picked from commit 2516103974)
(cherry picked from commit 18e6287963)
(cherry picked from commit e9694e67ab)
(cherry picked from commit a9763edaf0)
(cherry picked from commit e2b550f4fb)
(cherry picked from commit 2edac36701)

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

Update semver as v1.20 is entering release candidate mode

(cherry picked from commit 4995098ec3)
(cherry picked from commit 578ccfdd27)
(cherry picked from commit 1bf6ac0952)
(cherry picked from commit 2fe16b2bfe)
(cherry picked from commit 7cd9d027ee)
(cherry picked from commit eaed4be2ae)
(cherry picked from commit cc94f3115f)
(cherry picked from commit d7a77e35cc)
(cherry picked from commit cd8eb68ab7)
(cherry picked from commit 68487ac95f)
(cherry picked from commit 616dceb565)
(cherry picked from commit 545fe5975b)
(cherry picked from commit c042cf8eda)
(cherry picked from commit ae5e5a7468)
(cherry picked from commit 8034ef5fa2)
(cherry picked from commit aaf0293034)
(cherry picked from commit daafa8ce58)
(cherry picked from commit 7ca3681d3e)
(cherry picked from commit e8ebceafc4)
(cherry picked from commit 6954d234d3)
(cherry picked from commit e3fe904740)
(cherry picked from commit 7cedcd9967)

[API] Move forgejo api file (squash)

- Move the file to accommodate faa28b5a44

(cherry picked from commit 77076b92163ba28129c6dcda5724d42ab3ccd94f)
(cherry picked from commit 1bbfdf308b)
(cherry picked from commit e90325f640)
(cherry picked from commit 9626abce95)
(cherry picked from commit 34ae479ae4)
2023-11-13 12:33:48 +01:00
Earl Warren 1c3ad857ab
[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 76023319c4)
(cherry picked from commit 55eb05b03d)
(cherry picked from commit 49c84de3df)
(cherry picked from commit e8e26f08a6)
(cherry picked from commit 401aa12cac)
(cherry picked from commit 4ae8f663ad)
(cherry picked from commit 1ba6b35cd7)
(cherry picked from commit 2b671642cb)
(cherry picked from commit 7fa16f0016)
(cherry picked from commit e6eeb83d54)
(cherry picked from commit aebc7808f6)
2023-11-13 12:33:48 +01:00
Earl Warren 20dadef55c
[CI] Makefile: release: only supported platforms
(cherry picked from commit 16381262c5)
(cherry picked from commit c93f41dcef)
(cherry picked from commit cf17c69487)
(cherry picked from commit 174b8cf327)
(cherry picked from commit ae1b8dd441)
(cherry picked from commit 1b56d9049f)
(cherry picked from commit 6b00196175)
(cherry picked from commit 7f9ca7ea4b)
(cherry picked from commit a89650c9eb)
(cherry picked from commit 375526a7e6)
(cherry picked from commit 77ed7a6cb0)
(cherry picked from commit 3e0d9279c2)
(cherry picked from commit 24d440bcf5)
2023-11-13 11:52:15 +01:00
Earl Warren 93ac1a124e
[CI] lint-go-vet: do not include gitea-vet
(cherry picked from commit 8cbbab7fef)
(cherry picked from commit 51113f0f29)
(cherry picked from commit 0d061e411f)
(cherry picked from commit 1eb4e7e691)
(cherry picked from commit 3c3760f3b6)
(cherry picked from commit c11907373d)
(cherry picked from commit d990fcf446)
(cherry picked from commit 6b008dbf0b)
(cherry picked from commit 5d246bd693)
(cherry picked from commit 556014cf6f)
(cherry picked from commit 3aebff7667)
(cherry picked from commit 17d12dbfa9)
(cherry picked from commit 62495741e2)
2023-11-13 11:52:15 +01:00
Earl Warren ce04919711
[CI] Forgejo Actions based release process
Refs: https://codeberg.org/forgejo/website/pulls/230
(cherry picked from commit 87d56bf6c7)

[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 9efdc27e49)

[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 7afec520c4)

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

(cherry picked from commit d8f4f4807b)

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

(cherry picked from commit a52778c747)
(cherry picked from commit cf2ec62740)

[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 6decf111a1)
(cherry picked from commit 206d0b3886)

[CI] read STORED_VERSION_FILE if available

(cherry picked from commit af74085ebf)

[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 84d02a174a)
(cherry picked from commit 854be47328)

[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 168d5d5869)
(cherry picked from commit 8756c9a72a)
(cherry picked from commit 2dad7ef20f)

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

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

[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 bd88a44778)
(cherry picked from commit b408085138)

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

(cherry picked from commit d8c921d5a6)
(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 c8d8bf8996)

[CI] pin go v1.20 for testing

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

Conflicts:
	Dockerfile
	Dockerfile.rootless
	see https://codeberg.org/forgejo/forgejo/pulls/1303
(cherry picked from commit 6e2be54a6d)
(cherry picked from commit 346c418b4a)
(cherry picked from commit 49061f8422)
(cherry picked from commit 8229d59b7e)
(cherry picked from commit 70d45d9193)

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

(cherry picked from commit 722b1f4590)
(cherry picked from commit a91d786169)

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

(cherry picked from commit fbdf9d6abb)
(cherry picked from commit 2deff90a13)
(cherry picked from commit 9974dc031d)
(cherry picked from commit 702aecc50d)

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

Refs: https://codeberg.org/forgejo/forgejo/issues/1600

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

(cherry picked from commit 9e3de8e985)
(cherry picked from commit 07b442f9b7)

Conflicts:
	Dockerfile
	Dockerfile.rootless
	https://codeberg.org/forgejo/forgejo/pulls/1690
(cherry picked from commit 3b567f30eb)
(cherry picked from commit fabc9c67ac)
2023-11-13 11:52:15 +01:00
Loïc Dachary a56129c3d9
[CI] implementation: publish forgejo- binaries instead of gitea-
(cherry picked from commit 6d910daafb)
(cherry picked from commit d447861cc9)
(cherry picked from commit dc6e9d8799)
(cherry picked from commit ef232fa20c)
(cherry picked from commit 290c55517a)
(cherry picked from commit db48af1784)
(cherry picked from commit 85f33237a2)
(cherry picked from commit 76899ee33e)
(cherry picked from commit 148b3ee9cb)
(cherry picked from commit 1f6ad8f465)
(cherry picked from commit c330afdba3)
(cherry picked from commit b1f87075a7)
(cherry picked from commit 7da40992cc)
(cherry picked from commit 7ab19ff5e5)
(cherry picked from commit e61e44921b)
(cherry picked from commit 83646119fb)
(cherry picked from commit 20cf748e61)
(cherry picked from commit 0a99919cec)
(cherry picked from commit 21215222a6)
(cherry picked from commit 0f6c5658d7)
(cherry picked from commit 1752e43d3c)
(cherry picked from commit 2332080929)
(cherry picked from commit 590aabf2a2)
(cherry picked from commit 87d8b7b315c3e25bd3fcf9dc9c1d359bcd107281)
(cherry picked from commit ff37de38be)
(cherry picked from commit cee32c9e7a)
(cherry picked from commit 39faade524)
(cherry picked from commit 0e5ca477b6)
(cherry picked from commit 70e2730f7b)
(cherry picked from commit 2ad4003944)
(cherry picked from commit 2429de9e87)
(cherry picked from commit c133915fc1)
(cherry picked from commit c607dcaf9f)
(cherry picked from commit 86cb634711)
(cherry picked from commit ab96f8765e)
(cherry picked from commit cbf70f71d0)
(cherry picked from commit 0e61fc89aa)
(cherry picked from commit 781ae4384e)
(cherry picked from commit 271410a9da)
2023-11-13 11:52:15 +01:00
Giteabot 81d233d987
Install poetry dependencies with --no-root (#27919) (#27920)
Backport #27919 by @silverwind

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).

Co-authored-by: silverwind <me@silverwind.io>
2023-11-06 02:14:46 +00:00
Giteabot e9fcdf822c
Update JS and Poetry dependencies and eslint (#27200) (#27201)
Backport #27200 by @silverwind

- 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

Co-authored-by: silverwind <me@silverwind.io>
2023-09-22 21:26:42 +00:00
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>
2023-09-07 22:24:06 -04:00
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
2023-08-20 22:59:19 +00:00
techknowlogick 653e77fd22
bump go to 1.21 (#26608)
Co-authored-by: Giteabot <teabot@gitea.io>
2023-08-21 00:27:46 +02:00
silverwind c6975e583a
Update govulncheck, fix typo (#26168)
- Update govulncheck to latest version
- Fix typo in variable name
2023-07-26 22:51:02 +00:00
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>
2023-07-26 04:53:13 +00:00
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>
2023-07-18 18:06:43 +02:00
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>
2023-07-09 11:58:06 +00:00
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`
2023-06-29 10:37:41 -04:00
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">
2023-06-27 21:44:17 +02:00
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.
2023-06-26 21:14:00 +00:00
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>
2023-06-23 09:52:15 +02:00
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.
2023-06-20 01:37:32 -04:00
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
2023-06-18 21:53:16 -04:00
techknowlogick ccc19eda0b
use Actions environment variables in Makefile (#25319) 2023-06-17 23:26:49 -04:00
techknowlogick 0ab9b7f426
Build nightly binaries with Actions (#25308)
Co-authored-by: silverwind <me@silverwind.io>
2023-06-16 17:00:39 +00:00
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).
2023-06-14 18:17:58 +00:00
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.
2023-05-31 02:07:04 +00:00
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>
2023-05-25 01:33:31 +00:00
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
```
2023-05-24 20:11:04 +00:00
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>
2023-05-23 13:54:21 +00:00
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>
2023-05-11 21:21:28 -04:00
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>
2023-05-07 12:41:33 +08:00
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.
2023-04-24 23:43:19 +08:00
silverwind a319da0688
Replace whitespace inside template parens during make fmt (#24293)
Remove space/tab after `(` and before `)` in templates. Only two
violations it seems.
2023-04-24 02:48:43 -04:00
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
2023-04-22 14:53:00 -04:00
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).
2023-04-17 10:46:25 -04:00
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
2023-04-09 20:05:12 +02:00
John Olheiser 797babbfcb
Remove -v from vulncheck (#23953)
We should think about locking this dep, but for now this should get
builds going again.
2023-04-06 13:58:05 -05:00
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.
2023-03-25 16:22:51 -04:00
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 )
2023-03-24 16:32:17 -04:00
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`).
2023-03-24 14:42:31 -04:00