mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-10 08:03:40 +02:00
* Bump docker/build-push-action from 5 to 6 (#36197) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/docker/build-push-action/releases">docker/build-push-action's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <ul> <li>Export build record and generate <a href="https://docs.docker.com/build/ci/github-actions/build-summary/">build summary</a> by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/1120">docker/build-push-action#1120</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.24.0 to 0.26.0 in <a href="https://redirect.github.com/docker/build-push-action/pull/1132">docker/build-push-action#1132</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1136">docker/build-push-action#1136</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1138">docker/build-push-action#1138</a></li> <li>Bump braces from 3.0.2 to 3.0.3 in <a href="https://redirect.github.com/docker/build-push-action/pull/1137">docker/build-push-action#1137</a></li> </ul> <blockquote> <p>[!NOTE] This major release adds support for generating <a href="https://docs.docker.com/build/ci/github-actions/build-summary/">Build summary</a> and exporting build record for your build. You can disable this feature by setting <a href="https://docs.docker.com/build/ci/github-actions/build-summary/#disable-job-summary"> <code>DOCKER_BUILD_SUMMARY: false</code> environment variable in your workflow</a>.</p> </blockquote> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v5.4.0...v6.0.0">https://github.com/docker/build-push-action/compare/v5.4.0...v6.0.0</a></p> <h2>v5.4.0</h2> <ul> <li>Show builder information before building by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/1128">docker/build-push-action#1128</a></li> <li>Handle attestations correctly with provenance and sbom inputs by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/1086">docker/build-push-action#1086</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.19.0 to 0.24.0 in <a href="https://redirect.github.com/docker/build-push-action/pull/1088">docker/build-push-action#1088</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1105">docker/build-push-action#1105</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1121">docker/build-push-action#1121</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1127">docker/build-push-action#1127</a></li> <li>Bump undici from 5.28.3 to 5.28.4 in <a href="https://redirect.github.com/docker/build-push-action/pull/1090">docker/build-push-action#1090</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v5.3.0...v5.4.0">https://github.com/docker/build-push-action/compare/v5.3.0...v5.4.0</a></p> <h2>v5.3.0</h2> <ul> <li>Bump <code>@docker/actions-toolkit</code> from 0.18.0 to 0.19.0 in <a href="https://redirect.github.com/docker/build-push-action/pull/1080">docker/build-push-action#1080</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v5.2.0...v5.3.0">https://github.com/docker/build-push-action/compare/v5.2.0...v5.3.0</a></p> <h2>v5.2.0</h2> <ul> <li>Disable quotes detection for <code>outputs</code> input by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/1074">docker/build-push-action#1074</a></li> <li>Warn about ignored inputs by <a href="https://github.com/favonia"><code>@favonia</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/1019">docker/build-push-action#1019</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.14.0 to 0.18.0 in <a href="https://redirect.github.com/docker/build-push-action/pull/1070">docker/build-push-action#1070</a></li> <li>Bump undici from 5.26.3 to 5.28.3 in <a href="https://redirect.github.com/docker/build-push-action/pull/1057">docker/build-push-action#1057</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0">https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0</a></p> <h2>v5.1.0</h2> <ul> <li>Add <code>annotations</code> input by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/992">docker/build-push-action#992</a></li> <li>Add <code>secret-envs</code> input by <a href="https://github.com/elias-lundgren"><code>@elias-lundgren</code></a> in <a href="https://redirect.github.com/docker/build-push-action/pull/980">docker/build-push-action#980</a></li> <li>Bump <code>@babel/traverse</code> from 7.17.3 to 7.23.2 in <a href="https://redirect.github.com/docker/build-push-action/pull/991">docker/build-push-action#991</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.13.0-rc.1 to 0.14.0 in <a href="https://redirect.github.com/docker/build-push-action/pull/990">docker/build-push-action#990</a> <a href="https://redirect.github.com/docker/build-push-action/pull/1006">docker/build-push-action#1006</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0">https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="263435318d"><code>2634353</code></a> Merge pull request <a href="https://redirect.github.com/docker/build-push-action/issues/1381">#1381</a> from docker/dependabot/npm_and_yarn/docker/actions-t...</li> <li><a href="c0432d2e01"><code>c0432d2</code></a> chore: update generated content</li> <li><a href="0bb1f27d6b"><code>0bb1f27</code></a> set builder driver and endpoint attributes for dbc summary support</li> <li><a href="5f9dbf956c"><code>5f9dbf9</code></a> chore(deps): Bump <code>@docker/actions-toolkit</code> from 0.61.0 to 0.62.1</li> <li><a href="0788c444d8"><code>0788c44</code></a> Merge pull request <a href="https://redirect.github.com/docker/build-push-action/issues/1375">#1375</a> from crazy-max/remove-gcr</li> <li><a href="aa179ca4f4"><code>aa179ca</code></a> e2e: remove GCR</li> <li><a href="1dc7386353"><code>1dc7386</code></a> Merge pull request <a href="https://redirect.github.com/docker/build-push-action/issues/1364">#1364</a> from crazy-max/history-export-cmd</li> <li><a href="9c9803f364"><code>9c9803f</code></a> chore: update generated content</li> <li><a href="db1f6c46e8"><code>db1f6c4</code></a> DOCKER_BUILD_EXPORT_LEGACY env var to opt-in for legacy export</li> <li><a href="721e8c79de"><code>721e8c7</code></a> Bump <code>@docker/actions-toolkit</code> from 0.59.0 to 0.61.0</li> <li>Additional commits viewable in <a href="https://github.com/docker/build-push-action/compare/v5...v6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump aws-actions/configure-aws-credentials from 4 to 5 (#36196) [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 4 to 5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/aws-actions/configure-aws-credentials/releases">aws-actions/configure-aws-credentials's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.1...v5.0.0">5.0.0</a> (2025-09-03)</h2> <h3>⚠ BREAKING CHANGES</h3> <ul> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>)</li> </ul> <h3>Features</h3> <ul> <li>add skip OIDC option (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1458">#1458</a>) (<a href="8c45f6b081">8c45f6b</a>)</li> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>) (<a href="74b3e27aa8">74b3e27</a>)</li> <li>support account id allowlist (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1456">#1456</a>) (<a href="c4be498953">c4be498</a>)</li> </ul> <h2>v4.3.1</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.0...v4.3.1">4.3.1</a> (2025-08-04)</h2> <h3>Bug Fixes</h3> <ul> <li>update readme to 4.3.1 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1424">#1424</a>) (<a href="be2e7ad815">be2e7ad</a>)</li> </ul> <h2>v4.3.0</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.0...v4.3.0">4.3.0</a> (2025-08-04)</h2> <p>NOTE: This release tag originally pointed to 59b441846ad109fa4a1549b73ef4e149c4bfb53b, but a critical bug was discovered shortly after publishing. We updated this tag to d0834ad3a60a024346910e522a81b0002bd37fea to prevent anyone using the 4.3.0 tag from encountering the bug, and we published 4.3.1 to allow workflows to auto update correctly.</p> <h3>Features</h3> <ul> <li>dependency update and feature cleanup (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1414">#1414</a>) (<a href="59489ba544">59489ba</a>), closes <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1062">#1062</a> <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1191">#1191</a></li> <li>Optional environment variable output (<a href="c3b3ce61b0">c3b3ce6</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>docs:</strong> readme samples versioning (<a href="5b3c895046">5b3c895</a>)</li> <li>the wrong example region for China partition in README (<a href="37fe9a740b">37fe9a7</a>)</li> <li>properly set proxy environment variable (<a href="cbea70821e">cbea708</a>)</li> </ul> <h3>Miscellaneous Chores</h3> <ul> <li>release 4.3.0 (<a href="3f7c218721">3f7c218</a>)</li> </ul> <h2>v4.2.1</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.2.0...v4.2.1">4.2.1</a> (2025-05-14)</h2> <h3>Bug Fixes</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md">aws-actions/configure-aws-credentials's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.0...v5.1.1">5.1.1</a> (2025-11-24)</h2> <h3>Miscellaneous Chores</h3> <ul> <li>release 5.1.1 (<a href="56d6a583f0">56d6a58</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.0.0...v5.1.0">5.1.0</a> (2025-10-06)</h2> <h3>Features</h3> <ul> <li>Add global timeout support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1487">#1487</a>) (<a href="1584b8b0e2">1584b8b</a>)</li> <li>add no-proxy support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="dde9b22a8e">dde9b22</a>)</li> <li>Improve debug logging in retry logic (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1485">#1485</a>) (<a href="97ef425d73">97ef425</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>properly expose getProxyForUrl (introduced in <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1486">#1486</a>) (<a href="cea42985ac">cea4298</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.1...v5.0.0">5.0.0</a> (2025-09-03)</h2> <h3>⚠ BREAKING CHANGES</h3> <ul> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>)</li> </ul> <h3>Features</h3> <ul> <li>add skip OIDC option (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1458">#1458</a>) (<a href="8c45f6b081">8c45f6b</a>)</li> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>) (<a href="74b3e27aa8">74b3e27</a>)</li> <li>support account id allowlist (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1456">#1456</a>) (<a href="c4be498953">c4be498</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.0...v4.3.1">4.3.1</a> (2025-08-04)</h2> <h3>Bug Fixes</h3> <ul> <li>update readme to 4.3.1 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1424">#1424</a>) (<a href="be2e7ad815">be2e7ad</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.2.1...v4.3.0">4.3.0</a> (2025-08-04)</h2> <h3>Features</h3> <ul> <li>depenency update and feature cleanup (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1414">#1414</a>) (<a href="59489ba544">59489ba</a>), closes <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1062">#1062</a> <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1191">#1191</a></li> <li>Optional environment variable output (<a href="c3b3ce61b0">c3b3ce6</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="61815dcd50"><code>61815dc</code></a> chore(main): release 5.1.1 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1564">#1564</a>)</li> <li><a href="56d6a583f0"><code>56d6a58</code></a> chore: release 5.1.1</li> <li><a href="4a54c24244"><code>4a54c24</code></a> chore(deps-dev): bump glob from 10.4.5 to 10.5.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1563">#1563</a>)</li> <li><a href="b2793c943d"><code>b2793c9</code></a> chore(deps-dev): bump <code>@types/node</code> from 24.10.0 to 24.10.1 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1559">#1559</a>)</li> <li><a href="8c230bf21d"><code>8c230bf</code></a> chore: Update dist</li> <li><a href="f7a5b07d53"><code>f7a5b07</code></a> chore(deps): bump <code>@aws-sdk/client-sts</code> from 3.928.0 to 3.933.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1558">#1558</a>)</li> <li><a href="730fc04382"><code>730fc04</code></a> chore(deps-dev): bump <code>@biomejs/biome</code> from 2.3.4 to 2.3.6 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1555">#1555</a>)</li> <li><a href="bc0dd36aec"><code>bc0dd36</code></a> chore(deps-dev): bump memfs from 4.50.0 to 4.51.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1556">#1556</a>)</li> <li><a href="f2964c7281"><code>f2964c7</code></a> chore: Update dist</li> <li><a href="cf464951be"><code>cf46495</code></a> chore(deps): bump <code>@aws-sdk/client-sts</code> from 3.922.0 to 3.928.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1548">#1548</a>)</li> <li>Additional commits viewable in <a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4...v5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump dev-hanz-ops/install-gh-cli-action from 0.1.0 to 0.2.1 (#36195) Bumps [dev-hanz-ops/install-gh-cli-action](https://github.com/dev-hanz-ops/install-gh-cli-action) from 0.1.0 to 0.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dev-hanz-ops/install-gh-cli-action/releases">dev-hanz-ops/install-gh-cli-action's releases</a>.</em></p> <blockquote> <h2>v0.2.1 - arm64 support</h2> <ul> <li>support arm64 architecture - <a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli-action/pull/10">dev-hanz-ops/install-gh-cli-action#10</a> (by <a href="https://github.com/whatthefinemanual"><code>@whatthefinemanual</code></a>)</li> </ul> <h2>v0.2.0 - update to node20</h2> <ul> <li><a href="8fff9050da</a> (update to node20)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="af38ce09b1"><code>af38ce0</code></a> run build</li> <li><a href="eef2976ced"><code>eef2976</code></a> feature: Add multi architecture support (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli-action/issues/10">#10</a>)</li> <li><a href="2d19dc38f3"><code>2d19dc3</code></a> docs: update recomended action version (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli-action/issues/8">#8</a>)</li> <li><a href="8fff9050da"><code>8fff905</code></a> update to node 20</li> <li><a href="67bfd05393"><code>67bfd05</code></a> README: only linux amd64</li> <li><a href="4474568036"><code>4474568</code></a> Update readme with working example (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli-action/issues/3">#3</a>)</li> <li>See full diff in <a href="https://github.com/dev-hanz-ops/install-gh-cli-action/compare/v0.1.0...v0.2.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Front port changelog (#36193) Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> * Bump astral-sh/setup-uv from 6 to 7 (#36198) Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6 to 7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's releases</a>.</em></p> <blockquote> <h2>v7.0.0 🌈 node24 and a lot of bugfixes</h2> <h2>Changes</h2> <p>This release comes with a load of bug fixes and a speed up. Because of switching from node20 to node24 it is also a breaking change. If you are running on GitHub hosted runners this will just work, if you are using self-hosted runners make sure, that your runners are up to date. If you followed the normal installation instructions your self-hosted runner will keep itself updated.</p> <p>This release also removes the deprecated input <code>server-url</code> which was used to download uv releases from a different server. The <a href="https://github.com/astral-sh/setup-uv?tab=readme-ov-file#manifest-file">manifest-file</a> input supersedes that functionality by adding a flexible way to define available versions and where they should be downloaded from.</p> <h3>Fixes</h3> <ul> <li>The action now respects when the environment variable <code>UV_CACHE_DIR</code> is already set and does not overwrite it. It now also finds <a href="https://docs.astral.sh/uv/reference/settings/#cache-dir">cache-dir</a> settings in config files if you set them.</li> <li>Some users encountered problems that <a href="https://github.com/astral-sh/setup-uv?tab=readme-ov-file#disable-cache-pruning">cache pruning</a> took forever because they had some <code>uv</code> processes running in the background. Starting with uv version <code>0.8.24</code> this action uses <code>uv cache prune --ci --force</code> to ignore the running processes</li> <li>If you just want to install uv but not have it available in path, this action now respects <code>UV_NO_MODIFY_PATH</code></li> <li>Some other actions also set the env var <code>UV_CACHE_DIR</code>. This action can now deal with that but as this could lead to unwanted behavior in some edgecases a warning is now displayed.</li> </ul> <h3>Improvements</h3> <p>If you are using minimum version specifiers for the version of uv to install for example</p> <pre lang="toml"><code>[tool.uv] required-version = ">=0.8.17" </code></pre> <p>This action now detects that and directly uses the latest version. Previously it would download all available releases from the uv repo to determine the highest matching candidate for the version specifier, which took much more time.</p> <p>If you are using other specifiers like <code>0.8.x</code> this action still needs to download all available releases because the specifier defines an upper bound (not 0.9.0 or later) and "latest" would possibly not satisfy that.</p> <h2>🚨 Breaking changes</h2> <ul> <li>Use node24 instead of node20 <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/608">#608</a>)</li> <li>Remove deprecated input server-url <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/607">#607</a>)</li> </ul> <h2>🐛 Bug fixes</h2> <ul> <li>Respect UV_CACHE_DIR and cache-dir <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/612">#612</a>)</li> <li>Use --force when pruning cache <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/611">#611</a>)</li> <li>Respect UV_NO_MODIFY_PATH <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/603">#603</a>)</li> <li>Warn when <code>UV_CACHE_DIR</code> has changed <a href="https://github.com/jamesbraza"><code>@jamesbraza</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/601">#601</a>)</li> </ul> <h2>🚀 Enhancements</h2> <ul> <li>Shortcut to latest version for minimum version specifier <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/598">#598</a>)</li> </ul> <h2>🧰 Maintenance</h2> <ul> <li>Bump dependencies <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/613">#613</a>)</li> <li>Fix test-uv-no-modify-path <a href="https://github.com/eifinger"><code>@eifinger</code></a> (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/604">#604</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="681c641aba"><code>681c641</code></a> Bump actions/checkout from 5.0.0 to 6.0.1 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/712">#712</a>)</li> <li><a href="2e85713bb0"><code>2e85713</code></a> Bump actions/setup-node from 6.0.0 to 6.1.0 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/715">#715</a>)</li> <li><a href="58b6d7b303"><code>58b6d7b</code></a> fix: add OS version to cache key to prevent binary incompatibility (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/716">#716</a>)</li> <li><a href="e8b52af86e"><code>e8b52af</code></a> chore: update known checksums for 0.9.17 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/714">#714</a>)</li> <li><a href="ed21f2f24f"><code>ed21f2f</code></a> Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/695">#695</a>)</li> <li><a href="93202d8fbe"><code>93202d8</code></a> bump dependencies (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/709">#709</a>)</li> <li><a href="5ce090076d"><code>5ce0900</code></a> set biome files.maxSize to 2MiB (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/708">#708</a>)</li> <li><a href="4180991cd9"><code>4180991</code></a> allow cache-local-path w/o enable-cache (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/707">#707</a>)</li> <li><a href="0439606c8e"><code>0439606</code></a> Bump github/codeql-action from 4.30.9 to 4.31.6 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/698">#698</a>)</li> <li><a href="7dd56c18e9"><code>7dd56c1</code></a> chore: update known checksums for 0.9.16 (<a href="https://redirect.github.com/astral-sh/setup-uv/issues/706">#706</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/setup-uv/compare/v6...v7">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * Disable dependabot automatic labels (#36203) Disable dependabot's [automatic labels](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#labels--), we have `actions/labeler` to do this job. After this is merged, I will delete the labels `dependencies` and `github_actions` that dependabot had created. * Update chroma to v2.21.1 (#36201) https://github.com/alecthomas/chroma/releases/tag/v2.21.1 * [skip ci] Updated translations via Crowdin * Bump setup-node to v6, re-enable cache (#36207) * Add JSON linting (#36192) Uses https://github.com/eslint/json to lint all JSON and JSONC files in the repo. * Revert "Bump alpine to 3.23 (#36185)" (#36202) Unbreak the release pipelines. The issue is caused by https://gitlab.alpinelinux.org/alpine/aports/-/issues/17775 which supposedly fixed in 3.23.2 and our build did use that version from what I see, but maybe it's not fixed yet for `riscv`. We should try this upgrade again later. * Add date to "No Contributions" tooltip (#36190) Fixes https://github.com/go-gitea/gitea/issues/36188 via52bbfd7a15. Before: <img width="183" height="92" alt="Screenshot 2025-12-18 at 16 50 18" src="https://github.com/user-attachments/assets/f06ca7d6-a141-499f-b6da-e46064a44846" /> After: <img width="292" height="78" alt="Screenshot 2025-12-18 at 17 08 36" src="https://github.com/user-attachments/assets/b80f7391-7960-44ad-8184-ffab4c9a4ea7" /> If there will be more changes in the future, we should vendor this module. Co-authored-by: Giteabot <teabot@gitea.io> * Add `modifies/dependencies` label to dependabot (#36206) `actions/labeler` can not detect dependency updates in actions because it works on file level, so we need to let dependabot set this label. * Fix labeler config for stylelint (#36199) Followup to rename inb8f1c9f048 (diff-cb3b3f608024ee0bd45ea10b08ca6d3fcf40523a3d40182a438937231d8b8072). * Bump appleboy/git-push-action from 0.0.3 to 1.0.0 (#36194) Bumps [appleboy/git-push-action](https://github.com/appleboy/git-push-action) from 0.0.3 to 1.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/appleboy/git-push-action/releases">appleboy/git-push-action's releases</a>.</em></p> <blockquote> <h2>v1.0.0</h2> <h2>Changelog</h2> <h3>Enhancements</h3> <ul> <li>50ae8aaf06c6fc08b3d13da3aa03deb50d970125: chore(docker): improve overall system performance and API integration (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> </ul> <h3>Build process updates</h3> <ul> <li>feea2e25baaa5ea24a9689a8af03f229ec1dd1a2: ci: improve testing workflow and API usage (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> <li>5d65d1094eb0415898554ba83c4f3196778f9a85: ci: improve testing workflow and API usage (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> <li>b31dd8d6e7ba1e80a96a4772d8c4290fe7bac0ce: build: update base image in Dockerfile (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> <li>fc585cfea49d10c08f8009f674c05961a0934647: ci(goreleaser): implement automated release process with GoReleaser (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> <li>b1e5e3d76ccb4afd43bc0859672a6f9113fa0458: ci(test): optimize CI workflow and test configurations (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> </ul> <h3>Documentation updates</h3> <ul> <li>8f1f45876617e5d74085a38164c421be39f099b3: docs(readme): refactor codebase and improve test coverage (<a href="https://github.com/appleboy"><code>@appleboy</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="b1e5e3d76c"><code>b1e5e3d</code></a> ci(test): optimize CI workflow and test configurations</li> <li><a href="8f1f458766"><code>8f1f458</code></a> docs(readme): refactor codebase and improve test coverage</li> <li><a href="fc585cfea4"><code>fc585cf</code></a> ci(goreleaser): implement automated release process with GoReleaser</li> <li><a href="50ae8aaf06"><code>50ae8aa</code></a> chore(docker): improve overall system performance and API integration</li> <li><a href="b31dd8d6e7"><code>b31dd8d</code></a> build: update base image in Dockerfile</li> <li><a href="5d65d1094e"><code>5d65d10</code></a> ci: improve testing workflow and API usage</li> <li><a href="feea2e25ba"><code>feea2e2</code></a> ci: improve testing workflow and API usage</li> <li>See full diff in <a href="https://github.com/appleboy/git-push-action/compare/v0.0.3...v1.0.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump crowdin/github-action from 1 to 2 (#36204) Bumps [crowdin/github-action](https://github.com/crowdin/github-action) from 1 to 2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/crowdin/github-action/releases">crowdin/github-action's releases</a>.</em></p> <blockquote> <h2>v2.0.0</h2> <h2>What's Changed</h2> <h3>Features</h3> <ul> <li>Now the Action uses the new <a href="https://crowdin.github.io/crowdin-cli/blog/2024/05/28/cli-v4">CLI v4</a></li> </ul> <h3>Deprecations</h3> <p>Removed deprecated options:</p> <ul> <li><code>add_crowdin_branch</code></li> <li><code>new_branch_title</code></li> <li><code>new_branch_export_pattern</code></li> <li><code>new_branch_priority</code></li> <li><code>delete_crowdin_branch</code></li> </ul> <p>Instead, use the <code>command: branch add <name></code> to create a new branch.</p> <ul> <li><code>identity</code> - this option doesn't make much sense in the context of the GitHub action, where environment variables are a de facto standard for credentials loading.</li> </ul> <hr /> <p><strong>Full Changelog</strong>: <a href="https://github.com/crowdin/github-action/compare/v1.20.4...v2.0.0">https://github.com/crowdin/github-action/compare/v1.20.4...v2.0.0</a></p> <h2>v1.20.4</h2> <h2>What's Changed</h2> <ul> <li>CLI <a href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.4">3.19.4</a> by <a href="https://github.com/andrii-bodnar"><code>@andrii-bodnar</code></a></li> <li>ci: upgrade actions by <a href="https://github.com/andrii-bodnar"><code>@andrii-bodnar</code></a> in <a href="https://redirect.github.com/crowdin/github-action/pull/226">crowdin/github-action#226</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/crowdin/github-action/compare/v1.20.3...v1.20.4">https://github.com/crowdin/github-action/compare/v1.20.3...v1.20.4</a></p> <h2>v1.20.3</h2> <h2>What's Changed</h2> <ul> <li>CLI <a href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.3">3.19.3</a> by <a href="https://github.com/andrii-bodnar"><code>@andrii-bodnar</code></a></li> <li>chore: deprecate the 'identity' option by <a href="https://github.com/andrii-bodnar"><code>@andrii-bodnar</code></a> in <a href="https://redirect.github.com/crowdin/github-action/pull/224">crowdin/github-action#224</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/crowdin/github-action/compare/v1.20.2...v1.20.3">https://github.com/crowdin/github-action/compare/v1.20.2...v1.20.3</a></p> <h2>v1.20.2</h2> <h2>What's Changed</h2> <ul> <li>CLI <a href="https://github.com/crowdin/crowdin-cli/releases/tag/3.19.2">3.19.2</a> by <a href="https://github.com/andrii-bodnar"><code>@andrii-bodnar</code></a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/crowdin/github-action/compare/v1.20.1...v1.20.2">https://github.com/crowdin/github-action/compare/v1.20.1...v1.20.2</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="60debf382e"><code>60debf3</code></a> docs: add example for source files caching between workflow runs (<a href="https://redirect.github.com/crowdin/github-action/issues/298">#298</a>)</li> <li><a href="96b44e6697"><code>96b44e6</code></a> chore: CLI 4.12.0</li> <li><a href="08713f00a5"><code>08713f0</code></a> feat: add pull_request_created output to track PR status (<a href="https://redirect.github.com/crowdin/github-action/issues/294">#294</a>)</li> <li><a href="fb221ac1c8"><code>fb221ac</code></a> fix: bundle download with branch param conflict (<a href="https://redirect.github.com/crowdin/github-action/issues/291">#291</a>)</li> <li><a href="0749939f63"><code>0749939</code></a> chore: CLI 4.11.0</li> <li><a href="9787f4fcb6"><code>9787f4f</code></a> chore: CLI 4.10.0</li> <li><a href="590c05e09a"><code>590c05e</code></a> chore: CLI 4.9.1</li> <li><a href="9fd07c1c5b"><code>9fd07c1</code></a> chore: CLI 4.9.0</li> <li><a href="297234bae0"><code>297234b</code></a> chore: CLI 4.8.0</li> <li><a href="37201e27ee"><code>37201e2</code></a> docs: AI Localization improvements (<a href="https://redirect.github.com/crowdin/github-action/issues/283">#283</a>)</li> <li>Additional commits viewable in <a href="https://github.com/crowdin/github-action/compare/v1...v2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: silverwind <me@silverwind.io> * Convert locale files from ini to json format (#35489) Migrate from the current INI format to JSON for translations. JSON is widely supported, including by platforms such as Crowdin and Weblate. * [skip ci] Updated translations via Crowdin * Fix regression in writing authorized principals (#36213) Add additional logic with tests to restore the previous behaviour when writing the principals file. Fixes: #36212 --------- Signed-off-by: Peter Verraedt <peter.verraedt@kuleuven.be> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Show edit page confirmation dialog on tree view file change (#36130) Currently, when editing or deleting a file and the edit/commit form has changes, navigating the file tree will discard all changes without any warning. This PR prevents partial reloading when the edit form has unsaved changes, which will trigger a browser native warning dialog. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: silverwind <me@silverwind.io> Signed-off-by: Peter Verraedt <peter.verraedt@kuleuven.be> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Sebastian Ertz <sebastian.ertz@gmx.de> Co-authored-by: GiteaBot <teabot@gitea.io> Co-authored-by: Peter Verraedt <peter.verraedt@kuleuven.be> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: bytedream <me@bytedream.dev>
942 lines
36 KiB
Makefile
942 lines
36 KiB
Makefile
ifeq ($(USE_REPO_TEST_DIR),1)
|
|
|
|
# This rule replaces the whole Makefile when we're trying to use /tmp repository temporary files
|
|
location = $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
|
self := $(location)
|
|
|
|
%:
|
|
@tmpdir=`mktemp --tmpdir -d` ; \
|
|
echo Using temporary directory $$tmpdir for test repositories ; \
|
|
USE_REPO_TEST_DIR= $(MAKE) -f $(self) --no-print-directory REPO_TEST_DIR=$$tmpdir/ $@ ; \
|
|
STATUS=$$? ; rm -r "$$tmpdir" ; exit $$STATUS
|
|
|
|
else
|
|
|
|
# This is the "normal" part of the Makefile
|
|
|
|
DIST := dist
|
|
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
|
IMPORT := code.gitea.io/gitea
|
|
|
|
# By default use go's 1.25 experimental json v2 library when building
|
|
# TODO: remove when no longer experimental
|
|
export GOEXPERIMENT ?= jsonv2
|
|
|
|
GO ?= go
|
|
SHASUM ?= shasum -a 256
|
|
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
|
|
COMMA := ,
|
|
|
|
XGO_VERSION := go-1.25.x
|
|
|
|
AIR_PACKAGE ?= github.com/air-verse/air@v1
|
|
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
|
|
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.9.2
|
|
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2
|
|
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.15
|
|
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.7.0
|
|
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1
|
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
|
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
|
|
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
|
|
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1.7.9
|
|
|
|
DOCKER_IMAGE ?= gitea/gitea
|
|
DOCKER_TAG ?= latest
|
|
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
|
|
|
|
ifeq ($(HAS_GO), yes)
|
|
CGO_EXTRA_CFLAGS := -DSQLITE_MAX_VARIABLE_NUMBER=32766
|
|
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
|
|
endif
|
|
|
|
CGO_ENABLED ?= 0
|
|
ifneq (,$(findstring sqlite,$(TAGS))$(findstring pam,$(TAGS)))
|
|
CGO_ENABLED = 1
|
|
endif
|
|
|
|
STATIC ?=
|
|
EXTLDFLAGS ?=
|
|
ifneq ($(STATIC),)
|
|
EXTLDFLAGS = -extldflags "-static"
|
|
endif
|
|
|
|
ifeq ($(GOOS),windows)
|
|
IS_WINDOWS := yes
|
|
else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows)
|
|
ifeq ($(GOOS),)
|
|
IS_WINDOWS := yes
|
|
endif
|
|
endif
|
|
ifeq ($(IS_WINDOWS),yes)
|
|
GOFLAGS := -v -buildmode=exe
|
|
EXECUTABLE ?= gitea.exe
|
|
else
|
|
GOFLAGS := -v
|
|
EXECUTABLE ?= gitea
|
|
endif
|
|
|
|
ifeq ($(shell sed --version 2>/dev/null | grep -q GNU && echo gnu),gnu)
|
|
SED_INPLACE := sed -i
|
|
else
|
|
SED_INPLACE := sed -i ''
|
|
endif
|
|
|
|
EXTRA_GOFLAGS ?=
|
|
|
|
MAKE_VERSION := $(shell "$(MAKE)" -v | cat | head -n 1)
|
|
MAKE_EVIDENCE_DIR := .make_evidence
|
|
|
|
GOTESTFLAGS ?=
|
|
ifeq ($(RACE_ENABLED),true)
|
|
GOFLAGS += -race
|
|
GOTESTFLAGS += -race
|
|
endif
|
|
|
|
STORED_VERSION_FILE := VERSION
|
|
|
|
GITHUB_REF_TYPE ?= branch
|
|
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
# Enable typescript support in Node.js before 22.18
|
|
# TODO: Remove this once we can raise the minimum Node.js version to 22.18 (alpine >= 3.23)
|
|
NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v 2>/dev/null | cut -c2- | tr '.' ' '))
|
|
ifeq ($(shell test "$(NODE_VERSION)" -lt "022018000"; echo $$?),0)
|
|
NODE_VARS := NODE_OPTIONS="--experimental-strip-types"
|
|
else
|
|
NODE_VARS :=
|
|
endif
|
|
|
|
ifneq ($(GITHUB_REF_TYPE),branch)
|
|
VERSION ?= $(subst v,,$(GITHUB_REF_NAME))
|
|
GITEA_VERSION ?= $(VERSION)
|
|
else
|
|
ifneq ($(GITHUB_REF_NAME),)
|
|
VERSION ?= $(subst release/v,,$(GITHUB_REF_NAME))-nightly
|
|
else
|
|
VERSION ?= main
|
|
endif
|
|
|
|
STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null)
|
|
ifneq ($(STORED_VERSION),)
|
|
GITEA_VERSION ?= $(STORED_VERSION)
|
|
else
|
|
GITEA_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
|
endif
|
|
endif
|
|
|
|
# if version = "main" then update version to "nightly"
|
|
ifeq ($(VERSION),main)
|
|
VERSION := main-nightly
|
|
endif
|
|
|
|
LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"
|
|
|
|
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/riscv64
|
|
|
|
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
|
|
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
|
|
|
|
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
|
|
WEBPACK_CONFIGS := webpack.config.ts tailwind.config.ts
|
|
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
|
|
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
|
|
|
|
BINDATA_DEST_WILDCARD := modules/migration/bindata.* modules/public/bindata.* modules/options/bindata.* modules/templates/bindata.*
|
|
|
|
GENERATED_GO_DEST := modules/charset/invisible_gen.go modules/charset/ambiguous_gen.go
|
|
|
|
SVG_DEST_DIR := public/assets/img/svg
|
|
|
|
AIR_TMP_DIR := .air
|
|
|
|
GO_LICENSE_TMP_DIR := .go-licenses
|
|
GO_LICENSE_FILE := assets/go-licenses.json
|
|
|
|
TAGS ?=
|
|
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
|
|
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
|
|
|
|
TEST_TAGS ?= $(TAGS_SPLIT) sqlite sqlite_unlock_notify
|
|
|
|
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
|
|
|
|
GO_DIRS := build cmd models modules routers services tests tools
|
|
WEB_DIRS := web_src/js web_src/css
|
|
|
|
ESLINT_FILES := web_src/js tools *.ts tests/e2e
|
|
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
|
|
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) templates options/locale/locale_en-US.json .github $(filter-out CHANGELOG.md, $(wildcard *.go *.md *.yml *.yaml *.toml))
|
|
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.json
|
|
|
|
GO_SOURCES := $(wildcard *.go)
|
|
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go")
|
|
GO_SOURCES += $(GENERATED_GO_DEST)
|
|
|
|
# Force installation of playwright dependencies by setting this flag
|
|
ifdef DEPS_PLAYWRIGHT
|
|
PLAYWRIGHT_FLAGS += --with-deps
|
|
endif
|
|
|
|
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
|
|
SWAGGER_SPEC_INPUT := templates/swagger/v1_input.json
|
|
SWAGGER_EXCLUDE := code.gitea.io/sdk
|
|
|
|
TEST_MYSQL_HOST ?= mysql:3306
|
|
TEST_MYSQL_DBNAME ?= testgitea
|
|
TEST_MYSQL_USERNAME ?= root
|
|
TEST_MYSQL_PASSWORD ?=
|
|
TEST_PGSQL_HOST ?= pgsql:5432
|
|
TEST_PGSQL_DBNAME ?= testgitea
|
|
TEST_PGSQL_USERNAME ?= postgres
|
|
TEST_PGSQL_PASSWORD ?= postgres
|
|
TEST_PGSQL_SCHEMA ?= gtestschema
|
|
TEST_MINIO_ENDPOINT ?= minio:9000
|
|
TEST_MSSQL_HOST ?= mssql:1433
|
|
TEST_MSSQL_DBNAME ?= gitea
|
|
TEST_MSSQL_USERNAME ?= sa
|
|
TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1
|
|
|
|
# Include local Makefile
|
|
# Makefile.local is listed in .gitignore
|
|
sinclude Makefile.local
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: help
|
|
help: Makefile ## print Makefile help information.
|
|
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m[TARGETS] default target: build\033[0m\n\n\033[35mTargets:\033[0m\n"} /^[0-9A-Za-z._-]+:.*?##/ { printf " \033[36m%-45s\033[0m %s\n", $$1, $$2 }' Makefile #$(MAKEFILE_LIST)
|
|
@printf " \033[36m%-46s\033[0m %s\n" "test-e2e[#TestSpecificName]" "test end to end using playwright"
|
|
@printf " \033[36m%-46s\033[0m %s\n" "test[#TestSpecificName]" "run unit test"
|
|
@printf " \033[36m%-46s\033[0m %s\n" "test-sqlite[#TestSpecificName]" "run integration test for sqlite"
|
|
|
|
.PHONY: go-check
|
|
go-check:
|
|
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9]+' go.mod | cut -d' ' -f2))
|
|
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
|
|
$(eval GO_VERSION := $(shell printf "%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9]+' | tr '.' ' ');))
|
|
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
|
|
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: git-check
|
|
git-check:
|
|
@if git lfs >/dev/null 2>&1 ; then : ; else \
|
|
echo "Gitea requires git with lfs support to run tests." ; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: node-check
|
|
node-check:
|
|
$(eval MIN_NODE_VERSION_STR := $(shell grep -Eo '"node":.*[0-9.]+"' package.json | sed -n 's/.*[^0-9.]\([0-9.]*\)"/\1/p'))
|
|
$(eval MIN_NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell echo '$(MIN_NODE_VERSION_STR)' | tr '.' ' ')))
|
|
$(eval PNPM_MISSING := $(shell hash pnpm > /dev/null 2>&1 || echo 1))
|
|
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" ]; then \
|
|
echo "Gitea requires Node.js $(MIN_NODE_VERSION_STR) or greater to build. You can get it at https://nodejs.org/en/download/"; \
|
|
exit 1; \
|
|
fi
|
|
@if [ "$(PNPM_MISSING)" = "1" ]; then \
|
|
echo "Gitea requires pnpm to build. You can install it at https://pnpm.io/installation"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: clean-all
|
|
clean-all: clean ## delete backend, frontend and integration files
|
|
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
|
|
|
|
.PHONY: clean
|
|
clean: ## delete backend and integration files
|
|
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST_WILDCARD) \
|
|
integrations*.test \
|
|
e2e*.test \
|
|
tests/integration/gitea-integration-* \
|
|
tests/integration/indexers-* \
|
|
tests/mysql.ini tests/pgsql.ini tests/mssql.ini man/ \
|
|
tests/e2e/gitea-e2e-*/ \
|
|
tests/e2e/indexers-*/ \
|
|
tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
|
|
|
|
.PHONY: fmt
|
|
fmt: ## format the Go and template code
|
|
@GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run tools/code-batch-process.go gitea-fmt -w '{file-list}'
|
|
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
|
|
@# strip whitespace after '{{' or '(' and before '}}' or ')' unless there is only
|
|
@# whitespace before it
|
|
@$(SED_INPLACE) \
|
|
-e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' \
|
|
-e 's/([ ]\{1,\}/(/g' -e '/^[ ]\{1,\})/! s/[ ]\{1,\})/)/g' \
|
|
$(TEMPLATES)
|
|
|
|
.PHONY: fmt-check
|
|
fmt-check: fmt
|
|
@diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "Please run 'make fmt' and commit the result:"; \
|
|
printf "%s" "$${diff}"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: $(TAGS_EVIDENCE)
|
|
$(TAGS_EVIDENCE):
|
|
@mkdir -p $(MAKE_EVIDENCE_DIR)
|
|
@echo "$(TAGS)" > $(TAGS_EVIDENCE)
|
|
|
|
ifneq "$(TAGS)" "$(shell cat $(TAGS_EVIDENCE) 2>/dev/null)"
|
|
TAGS_PREREQ := $(TAGS_EVIDENCE)
|
|
endif
|
|
|
|
.PHONY: generate-swagger
|
|
generate-swagger: $(SWAGGER_SPEC) ## generate the swagger spec from code comments
|
|
|
|
$(SWAGGER_SPEC): $(GO_SOURCES) $(SWAGGER_SPEC_INPUT)
|
|
$(GO) run $(SWAGGER_PACKAGE) generate spec --exclude "$(SWAGGER_EXCLUDE)" --input "$(SWAGGER_SPEC_INPUT)" --output './$(SWAGGER_SPEC)'
|
|
|
|
.PHONY: swagger-check
|
|
swagger-check: generate-swagger
|
|
@diff=$$(git diff --color=always '$(SWAGGER_SPEC)'); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "Please run 'make generate-swagger' and commit the result:"; \
|
|
printf "%s" "$${diff}"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: swagger-validate
|
|
swagger-validate: ## check if the swagger spec is valid
|
|
@# swagger "validate" requires that the "basePath" must start with a slash, but we are using Golang template "{{...}}"
|
|
@$(SED_INPLACE) -E -e 's|"basePath":( *)"(.*)"|"basePath":\1"/\2"|g' './$(SWAGGER_SPEC)' # add a prefix slash to basePath
|
|
@# FIXME: there are some warnings
|
|
$(GO) run $(SWAGGER_PACKAGE) validate './$(SWAGGER_SPEC)'
|
|
@$(SED_INPLACE) -E -e 's|"basePath":( *)"/(.*)"|"basePath":\1"\2"|g' './$(SWAGGER_SPEC)' # remove the prefix slash from basePath
|
|
|
|
.PHONY: checks
|
|
checks: checks-frontend checks-backend ## run various consistency checks
|
|
|
|
.PHONY: checks-frontend
|
|
checks-frontend: lockfile-check svg-check ## check frontend files
|
|
|
|
.PHONY: checks-backend
|
|
checks-backend: tidy-check swagger-check fmt-check swagger-validate security-check ## check backend files
|
|
|
|
.PHONY: lint
|
|
lint: lint-frontend lint-backend lint-spell ## lint everything
|
|
|
|
.PHONY: lint-fix
|
|
lint-fix: lint-frontend-fix lint-backend-fix lint-spell-fix ## lint everything and fix issues
|
|
|
|
.PHONY: lint-frontend
|
|
lint-frontend: lint-js lint-css ## lint frontend files
|
|
|
|
.PHONY: lint-frontend-fix
|
|
lint-frontend-fix: lint-js-fix lint-css-fix ## lint frontend files and fix issues
|
|
|
|
.PHONY: lint-backend
|
|
lint-backend: lint-go lint-go-gitea-vet lint-editorconfig ## lint backend files
|
|
|
|
.PHONY: lint-backend-fix
|
|
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
|
|
|
|
.PHONY: lint-js
|
|
lint-js: node_modules ## lint js files
|
|
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES)
|
|
$(NODE_VARS) pnpm exec vue-tsc
|
|
|
|
.PHONY: lint-js-fix
|
|
lint-js-fix: node_modules ## lint js files and fix issues
|
|
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES) --fix
|
|
$(NODE_VARS) pnpm exec vue-tsc
|
|
|
|
.PHONY: lint-css
|
|
lint-css: node_modules ## lint css files
|
|
$(NODE_VARS) pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES)
|
|
|
|
.PHONY: lint-css-fix
|
|
lint-css-fix: node_modules ## lint css files and fix issues
|
|
$(NODE_VARS) pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES) --fix
|
|
|
|
.PHONY: lint-swagger
|
|
lint-swagger: node_modules ## lint swagger files
|
|
$(NODE_VARS) pnpm exec spectral lint -q -F hint $(SWAGGER_SPEC)
|
|
|
|
.PHONY: lint-md
|
|
lint-md: node_modules ## lint markdown files
|
|
$(NODE_VARS) pnpm exec markdownlint *.md
|
|
|
|
.PHONY: lint-md-fix
|
|
lint-md-fix: node_modules ## lint markdown files and fix issues
|
|
$(NODE_VARS) pnpm exec markdownlint --fix *.md
|
|
|
|
.PHONY: lint-spell
|
|
lint-spell: ## lint spelling
|
|
@go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -error $(SPELLCHECK_FILES)
|
|
|
|
.PHONY: lint-spell-fix
|
|
lint-spell-fix: ## lint spelling and fix issues
|
|
@go run $(MISSPELL_PACKAGE) -dict assets/misspellings.csv -w $(SPELLCHECK_FILES)
|
|
|
|
.PHONY: lint-go
|
|
lint-go: ## lint go files
|
|
$(GO) run $(GOLANGCI_LINT_PACKAGE) run
|
|
|
|
.PHONY: lint-go-fix
|
|
lint-go-fix: ## lint go files and fix issues
|
|
$(GO) run $(GOLANGCI_LINT_PACKAGE) run --fix
|
|
|
|
# workaround step for the lint-go-windows CI task because 'go run' can not
|
|
# have distinct GOOS/GOARCH for its build and run steps
|
|
.PHONY: lint-go-windows
|
|
lint-go-windows:
|
|
@GOOS= GOARCH= $(GO) install $(GOLANGCI_LINT_PACKAGE)
|
|
golangci-lint run
|
|
|
|
.PHONY: lint-go-gitea-vet
|
|
lint-go-gitea-vet: ## lint go files with gitea-vet
|
|
@echo "Running gitea-vet..."
|
|
@$(GO) vet -vettool="$(shell GOOS= GOARCH= go tool -n gitea-vet)" ./...
|
|
|
|
.PHONY: lint-editorconfig
|
|
lint-editorconfig:
|
|
@echo "Running editorconfig check..."
|
|
@$(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) $(EDITORCONFIG_FILES)
|
|
|
|
.PHONY: lint-actions
|
|
lint-actions: ## lint action workflow files
|
|
$(GO) run $(ACTIONLINT_PACKAGE)
|
|
|
|
.PHONY: lint-templates
|
|
lint-templates: .venv node_modules ## lint template files
|
|
@node tools/lint-templates-svg.ts
|
|
@uv run --frozen djlint $(shell find templates -type f -iname '*.tmpl')
|
|
|
|
.PHONY: lint-yaml
|
|
lint-yaml: .venv ## lint yaml files
|
|
@uv run --frozen yamllint -s .
|
|
|
|
.PHONY: lint-json
|
|
lint-json: node_modules ## lint json files
|
|
$(NODE_VARS) pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0
|
|
|
|
.PHONY: lint-json-fix
|
|
lint-json-fix: node_modules ## lint and fix json files
|
|
$(NODE_VARS) pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0 --fix
|
|
|
|
.PHONY: watch
|
|
watch: ## watch everything and continuously rebuild
|
|
@bash tools/watch.sh
|
|
|
|
.PHONY: watch-frontend
|
|
watch-frontend: node-check node_modules ## watch frontend files and continuously rebuild
|
|
@rm -rf $(WEBPACK_DEST_ENTRIES)
|
|
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
|
|
|
|
.PHONY: watch-backend
|
|
watch-backend: go-check ## watch backend files and continuously rebuild
|
|
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml
|
|
|
|
.PHONY: test
|
|
test: test-frontend test-backend ## test everything
|
|
|
|
.PHONY: test-backend
|
|
test-backend: ## test backend files
|
|
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
|
|
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
|
|
|
|
.PHONY: test-frontend
|
|
test-frontend: node_modules ## test frontend files
|
|
$(NODE_VARS) pnpm exec vitest
|
|
|
|
.PHONY: test-check
|
|
test-check:
|
|
@echo "Running test-check...";
|
|
@diff=$$(git status -s); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "make test-backend has changed files in the source tree:"; \
|
|
printf "%s" "$${diff}"; \
|
|
echo "You should change the tests to create these files in a temporary directory."; \
|
|
echo "Do not simply add these files to .gitignore"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: test\#%
|
|
test\#%:
|
|
@echo "Running go test with -tags '$(TEST_TAGS)'..."
|
|
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
|
|
|
|
.PHONY: coverage
|
|
coverage:
|
|
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
|
|
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
|
|
$(GO) run tools/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all
|
|
|
|
.PHONY: unit-test-coverage
|
|
unit-test-coverage:
|
|
@echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
|
|
@$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_TEST_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
|
|
|
|
.PHONY: tidy
|
|
tidy: ## run go mod tidy
|
|
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
|
|
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
|
|
@$(MAKE) --no-print-directory $(GO_LICENSE_FILE)
|
|
|
|
vendor: go.mod go.sum
|
|
$(GO) mod vendor
|
|
@touch vendor
|
|
|
|
.PHONY: tidy-check
|
|
tidy-check: tidy
|
|
@diff=$$(git diff --color=always go.mod go.sum $(GO_LICENSE_FILE)); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "Please run 'make tidy' and commit the result:"; \
|
|
printf "%s" "$${diff}"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: go-licenses
|
|
go-licenses: $(GO_LICENSE_FILE) ## regenerate go licenses
|
|
|
|
$(GO_LICENSE_FILE): go.mod go.sum
|
|
@rm -rf $(GO_LICENSE_FILE)
|
|
$(GO) install $(GO_LICENSES_PACKAGE)
|
|
-GOOS=linux CGO_ENABLED=1 go-licenses save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
|
|
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
|
|
@rm -rf $(GO_LICENSE_TMP_DIR)
|
|
|
|
generate-ini-sqlite:
|
|
sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
|
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
|
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
tests/sqlite.ini.tmpl > tests/sqlite.ini
|
|
|
|
.PHONY: test-sqlite
|
|
test-sqlite: integrations.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test
|
|
|
|
.PHONY: test-sqlite\#%
|
|
test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
|
|
|
|
.PHONY: test-sqlite-migration
|
|
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test
|
|
|
|
generate-ini-mysql:
|
|
sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
|
|
-e 's|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
|
|
-e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
|
|
-e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
|
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
|
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
|
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
tests/mysql.ini.tmpl > tests/mysql.ini
|
|
|
|
.PHONY: test-mysql
|
|
test-mysql: integrations.mysql.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test
|
|
|
|
.PHONY: test-mysql\#%
|
|
test-mysql\#%: integrations.mysql.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
|
|
|
|
.PHONY: test-mysql-migration
|
|
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test
|
|
|
|
generate-ini-pgsql:
|
|
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
|
|
-e 's|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
|
|
-e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
|
|
-e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
|
|
-e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \
|
|
-e 's|{{TEST_MINIO_ENDPOINT}}|${TEST_MINIO_ENDPOINT}|g' \
|
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
|
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
|
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
tests/pgsql.ini.tmpl > tests/pgsql.ini
|
|
|
|
.PHONY: test-pgsql
|
|
test-pgsql: integrations.pgsql.test generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test
|
|
|
|
.PHONY: test-pgsql\#%
|
|
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
|
|
|
|
.PHONY: test-pgsql-migration
|
|
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test
|
|
|
|
generate-ini-mssql:
|
|
sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
|
|
-e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
|
|
-e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
|
|
-e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
|
|
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
|
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
|
|
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
|
|
tests/mssql.ini.tmpl > tests/mssql.ini
|
|
|
|
.PHONY: test-mssql
|
|
test-mssql: integrations.mssql.test generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test
|
|
|
|
.PHONY: test-mssql\#%
|
|
test-mssql\#%: integrations.mssql.test generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
|
|
|
|
.PHONY: test-mssql-migration
|
|
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test
|
|
|
|
.PHONY: playwright
|
|
playwright: deps-frontend
|
|
$(NODE_VARS) pnpm exec playwright install $(PLAYWRIGHT_FLAGS)
|
|
|
|
.PHONY: test-e2e%
|
|
test-e2e%: TEST_TYPE ?= e2e
|
|
# Clear display env variable. Otherwise, chromium tests can fail.
|
|
DISPLAY=
|
|
|
|
.PHONY: test-e2e
|
|
test-e2e: test-e2e-sqlite
|
|
|
|
.PHONY: test-e2e-sqlite
|
|
test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test
|
|
|
|
.PHONY: test-e2e-sqlite\#%
|
|
test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
|
|
|
|
.PHONY: test-e2e-mysql
|
|
test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test
|
|
|
|
.PHONY: test-e2e-mysql\#%
|
|
test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
|
|
|
|
.PHONY: test-e2e-pgsql
|
|
test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
|
|
|
|
.PHONY: test-e2e-pgsql\#%
|
|
test-e2e-pgsql\#%: playwright e2e.pgsql.test generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
|
|
|
|
.PHONY: test-e2e-mssql
|
|
test-e2e-mssql: playwright e2e.mssql.test generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test
|
|
|
|
.PHONY: test-e2e-mssql\#%
|
|
test-e2e-mssql\#%: playwright e2e.mssql.test generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$*
|
|
|
|
.PHONY: bench-sqlite
|
|
bench-sqlite: integrations.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
|
|
|
.PHONY: bench-mysql
|
|
bench-mysql: integrations.mysql.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
|
|
|
.PHONY: bench-mssql
|
|
bench-mssql: integrations.mssql.test generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
|
|
|
.PHONY: bench-pgsql
|
|
bench-pgsql: integrations.pgsql.test generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
|
|
|
|
.PHONY: integration-test-coverage
|
|
integration-test-coverage: integrations.cover.test generate-ini-mysql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
|
|
|
|
.PHONY: integration-test-coverage-sqlite
|
|
integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
|
|
|
|
integrations.mysql.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
|
|
|
|
integrations.pgsql.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
|
|
|
|
integrations.mssql.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mssql.test
|
|
|
|
integrations.sqlite.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
|
|
|
|
integrations.cover.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test
|
|
|
|
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
|
|
|
|
.PHONY: migrations.mysql.test
|
|
migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
|
|
|
|
.PHONY: migrations.pgsql.test
|
|
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
|
|
|
|
.PHONY: migrations.mssql.test
|
|
migrations.mssql.test: $(GO_SOURCES) generate-ini-mssql
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mssql.test
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test
|
|
|
|
.PHONY: migrations.sqlite.test
|
|
migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
|
|
|
|
.PHONY: migrations.individual.mysql.test
|
|
migrations.individual.mysql.test: $(GO_SOURCES)
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
|
|
|
|
.PHONY: migrations.individual.sqlite.test\#%
|
|
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
|
|
|
|
.PHONY: migrations.individual.pgsql.test
|
|
migrations.individual.pgsql.test: $(GO_SOURCES)
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
|
|
|
|
.PHONY: migrations.individual.pgsql.test\#%
|
|
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
|
|
|
|
.PHONY: migrations.individual.mssql.test
|
|
migrations.individual.mssql.test: $(GO_SOURCES) generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
|
|
|
|
.PHONY: migrations.individual.mssql.test\#%
|
|
migrations.individual.mssql.test\#%: $(GO_SOURCES) generate-ini-mssql
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
|
|
|
|
.PHONY: migrations.individual.sqlite.test
|
|
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
|
|
|
|
.PHONY: migrations.individual.sqlite.test\#%
|
|
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
|
|
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
|
|
|
|
e2e.mysql.test: $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
|
|
|
|
e2e.pgsql.test: $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
|
|
|
|
e2e.mssql.test: $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mssql.test
|
|
|
|
e2e.sqlite.test: $(GO_SOURCES)
|
|
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)'
|
|
|
|
.PHONY: check
|
|
check: test
|
|
|
|
.PHONY: install $(TAGS_PREREQ)
|
|
install: $(wildcard *.go)
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
|
|
|
|
.PHONY: build
|
|
build: frontend backend ## build everything
|
|
|
|
.PHONY: frontend
|
|
frontend: $(WEBPACK_DEST) ## build frontend files
|
|
|
|
.PHONY: backend
|
|
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
|
|
|
|
# We generate the backend before the frontend in case we in future we want to generate things in the frontend from generated files in backend
|
|
.PHONY: generate
|
|
generate: generate-backend ## run "go generate"
|
|
|
|
.PHONY: generate-backend
|
|
generate-backend: $(TAGS_PREREQ) generate-go
|
|
|
|
.PHONY: generate-go
|
|
generate-go: $(TAGS_PREREQ)
|
|
@echo "Running go generate..."
|
|
@CC= GOOS= GOARCH= CGO_ENABLED=0 $(GO) generate -tags '$(TAGS)' ./...
|
|
|
|
.PHONY: security-check
|
|
security-check:
|
|
GOEXPERIMENT= go run $(GOVULNCHECK_PACKAGE) -show color ./...
|
|
|
|
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
|
|
ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),)
|
|
$(error pam support set via TAGS doesn't support static builds)
|
|
endif
|
|
CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
|
|
|
|
.PHONY: release
|
|
release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-check
|
|
|
|
$(DIST_DIRS):
|
|
mkdir -p $(DIST_DIRS)
|
|
|
|
.PHONY: release-windows
|
|
release-windows: | $(DIST_DIRS)
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
|
|
ifeq (,$(findstring gogit,$(TAGS)))
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
|
|
endif
|
|
|
|
.PHONY: release-linux
|
|
release-linux: | $(DIST_DIRS)
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
|
|
|
|
.PHONY: release-darwin
|
|
release-darwin: | $(DIST_DIRS)
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
|
|
|
|
.PHONY: release-freebsd
|
|
release-freebsd: | $(DIST_DIRS)
|
|
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
|
|
|
|
.PHONY: release-copy
|
|
release-copy: | $(DIST_DIRS)
|
|
cd $(DIST); for file in `find . -type f -name "*"`; do cp $${file} ./release/; done;
|
|
|
|
.PHONY: release-check
|
|
release-check: | $(DIST_DIRS)
|
|
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "checksumming $${file}" && $(SHASUM) `echo $${file} | sed 's/^..//'` > $${file}.sha256; done;
|
|
|
|
.PHONY: release-compress
|
|
release-compress: | $(DIST_DIRS)
|
|
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PACKAGE) -k -9 $${file}; done;
|
|
|
|
.PHONY: release-sources
|
|
release-sources: | $(DIST_DIRS)
|
|
echo $(VERSION) > $(STORED_VERSION_FILE)
|
|
# bsdtar needs a ^ to prevent matching subdirectories
|
|
$(eval EXCL := --exclude=$(shell tar --help | grep -q bsdtar && echo "^")./)
|
|
# use transform to a add a release-folder prefix; in bsdtar the transform parameter equivalent is -s
|
|
$(eval TRANSFORM := $(shell tar --help | grep -q bsdtar && echo "-s '/^./gitea-src-$(VERSION)/'" || echo "--transform 's|^./|gitea-src-$(VERSION)/|'"))
|
|
tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) $(TRANSFORM) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .
|
|
rm -f $(STORED_VERSION_FILE)
|
|
|
|
.PHONY: deps
|
|
deps: deps-frontend deps-backend deps-tools deps-py ## install dependencies
|
|
|
|
.PHONY: deps-py
|
|
deps-py: .venv ## install python dependencies
|
|
|
|
.PHONY: deps-frontend
|
|
deps-frontend: node_modules ## install frontend dependencies
|
|
|
|
.PHONY: deps-backend
|
|
deps-backend: ## install backend dependencies
|
|
$(GO) mod download
|
|
|
|
.PHONY: deps-tools
|
|
deps-tools: ## install tool dependencies
|
|
$(GO) install $(AIR_PACKAGE) & \
|
|
$(GO) install $(EDITORCONFIG_CHECKER_PACKAGE) & \
|
|
$(GO) install $(GOFUMPT_PACKAGE) & \
|
|
$(GO) install $(GOLANGCI_LINT_PACKAGE) & \
|
|
$(GO) install $(GXZ_PACKAGE) & \
|
|
$(GO) install $(MISSPELL_PACKAGE) & \
|
|
$(GO) install $(SWAGGER_PACKAGE) & \
|
|
$(GO) install $(XGO_PACKAGE) & \
|
|
$(GO) install $(GO_LICENSES_PACKAGE) & \
|
|
$(GO) install $(GOVULNCHECK_PACKAGE) & \
|
|
$(GO) install $(ACTIONLINT_PACKAGE) & \
|
|
wait
|
|
|
|
node_modules: pnpm-lock.yaml
|
|
$(NODE_VARS) pnpm install --frozen-lockfile
|
|
@touch node_modules
|
|
|
|
.venv: uv.lock
|
|
uv sync
|
|
@touch .venv
|
|
|
|
.PHONY: update
|
|
update: update-js update-py ## update js and py dependencies
|
|
|
|
.PHONY: update-js
|
|
update-js: node-check | node_modules ## update js dependencies
|
|
$(NODE_VARS) pnpm exec updates -u -f package.json
|
|
rm -rf node_modules pnpm-lock.yaml
|
|
$(NODE_VARS) pnpm install
|
|
$(NODE_VARS) pnpm exec nolyfill install
|
|
$(NODE_VARS) pnpm install
|
|
@touch node_modules
|
|
|
|
.PHONY: update-py
|
|
update-py: node-check | node_modules ## update py dependencies
|
|
$(NODE_VARS) pnpm exec updates -u -f pyproject.toml
|
|
rm -rf .venv uv.lock
|
|
uv sync
|
|
@touch .venv
|
|
|
|
.PHONY: webpack
|
|
webpack: $(WEBPACK_DEST) ## build webpack files
|
|
|
|
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
|
|
@$(MAKE) -s node-check node_modules
|
|
@rm -rf $(WEBPACK_DEST_ENTRIES)
|
|
@echo "Running webpack..."
|
|
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
|
|
@touch $(WEBPACK_DEST)
|
|
|
|
.PHONY: svg
|
|
svg: node-check | node_modules ## build svg files
|
|
rm -rf $(SVG_DEST_DIR)
|
|
node tools/generate-svg.ts
|
|
|
|
.PHONY: svg-check
|
|
svg-check: svg
|
|
@git add $(SVG_DEST_DIR)
|
|
@diff=$$(git diff --color=always --cached $(SVG_DEST_DIR)); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
|
|
printf "%s" "$${diff}"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: lockfile-check
|
|
lockfile-check:
|
|
$(NODE_VARS) pnpm install --frozen-lockfile
|
|
@diff=$$(git diff --color=always pnpm-lock.yaml); \
|
|
if [ -n "$$diff" ]; then \
|
|
echo "pnpm-lock.yaml is inconsistent with package.json"; \
|
|
echo "Please run 'pnpm install --frozen-lockfile' and commit the result:"; \
|
|
printf "%s" "$${diff}"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: generate-gitignore
|
|
generate-gitignore: ## update gitignore files
|
|
$(GO) run build/generate-gitignores.go
|
|
|
|
.PHONY: generate-images
|
|
generate-images: | node_modules ## generate images
|
|
cd tools && node generate-images.ts $(TAGS)
|
|
|
|
.PHONY: generate-manpage
|
|
generate-manpage: ## generate manpage
|
|
@[ -f gitea ] || make backend
|
|
@mkdir -p man/man1/ man/man5
|
|
@./gitea docs --man > man/man1/gitea.1
|
|
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
|
|
@#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page
|
|
|
|
.PHONY: docker
|
|
docker:
|
|
docker build --disable-content-trust=false -t $(DOCKER_REF) .
|
|
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
|
|
|
|
# This endif closes the if at the top of the file
|
|
endif
|
|
|
|
# Disable parallel execution because it would break some targets that don't
|
|
# specify exact dependencies like 'backend' which does currently not depend
|
|
# on 'frontend' to enable Node.js-less builds from source tarballs.
|
|
.NOTPARALLEL:
|