rebrand: ganti sisa teks 'GitHub' -> 'Gitea' (UI, komentar, dokumen)
CI / test (push) Successful in 1m0s
CI / test (push) Successful in 1m0s
This commit is contained in:
1 parent
651fd0fc3d
commit
e771c00446
5 files changed
+11
-11
No files matched your search
@@ -128,7 +128,7 @@ start (only when running as an AppImage) and offers to install it:
|
|||||||
|
|
||||||
*Check for Updates* in the footer runs the same flow manually.
|
*Check for Updates* in the footer runs the same flow manually.
|
||||||
|
|
||||||
**Publishing a release** is just a tag — GitHub Actions builds and uploads
|
**Publishing a release** is just a tag — Gitea Actions builds and uploads
|
||||||
everything (`.github/workflows/release.yml`):
|
everything (`.github/workflows/release.yml`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ func (ui *app) scheduleUpdateCheck() {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkForUpdate mengambil rilis terbaru dari GitHub. manual=false hanya
|
// checkForUpdate mengambil rilis terbaru dari Gitea. manual=false hanya
|
||||||
// memberitahu kalau memang ada versi baru.
|
// memberitahu kalau memang ada versi baru.
|
||||||
func (ui *app) checkForUpdate(manual bool) {
|
func (ui *app) checkForUpdate(manual bool) {
|
||||||
if ui.version == "" || ui.version == "dev" {
|
if ui.version == "" || ui.version == "dev" {
|
||||||
@@ -97,7 +97,7 @@ func (ui *app) markUpdatePending(rel update.Release) {
|
|||||||
|
|
||||||
// showUpdateDialog menawarkan update: unduh sekarang, buka halaman rilis, atau nanti.
|
// showUpdateDialog menawarkan update: unduh sekarang, buka halaman rilis, atau nanti.
|
||||||
func (ui *app) showUpdateDialog(rel update.Release) {
|
func (ui *app) showUpdateDialog(rel update.Release) {
|
||||||
// catatan rilis GitHub berformat markdown; render supaya blok kode/daftar
|
// catatan rilis Gitea berformat markdown; render supaya blok kode/daftar
|
||||||
// tidak tampil sebagai teks mentah
|
// tidak tampil sebagai teks mentah
|
||||||
notes := widget.NewRichTextFromMarkdown(rel.Notes)
|
notes := widget.NewRichTextFromMarkdown(rel.Notes)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Package update memeriksa rilis terbaru LazyRun di GitHub dan memasangnya.
|
// Package update memeriksa rilis terbaru LazyRun di Gitea dan memasangnya.
|
||||||
package update
|
package update
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -38,22 +38,22 @@ func RepoURL() string { return repoURL }
|
|||||||
type Release struct {
|
type Release struct {
|
||||||
Tag string // tag asli, mis. "v1.1.0"
|
Tag string // tag asli, mis. "v1.1.0"
|
||||||
Version string // versi tanpa awalan v, mis. "1.1.0"
|
Version string // versi tanpa awalan v, mis. "1.1.0"
|
||||||
Notes string // catatan rilis (markdown GitHub)
|
Notes string // catatan rilis (markdown Gitea)
|
||||||
PageURL string // halaman rilis di GitHub
|
PageURL string // halaman rilis di Gitea
|
||||||
AppImage string // URL unduhan AppImage (kosong kalau tidak ada)
|
AppImage string // URL unduhan AppImage (kosong kalau tidak ada)
|
||||||
Zsync string // URL berkas .zsync (opsional)
|
Zsync string // URL berkas .zsync (opsional)
|
||||||
}
|
}
|
||||||
|
|
||||||
var client = &http.Client{Timeout: 20 * time.Second}
|
var client = &http.Client{Timeout: 20 * time.Second}
|
||||||
|
|
||||||
// Latest mengambil rilis terbaru dari GitHub.
|
// Latest mengambil rilis terbaru dari Gitea.
|
||||||
func Latest() (Release, error) {
|
func Latest() (Release, error) {
|
||||||
var rel Release
|
var rel Release
|
||||||
req, err := http.NewRequest(http.MethodGet, apiBase+"/latest", nil)
|
req, err := http.NewRequest(http.MethodGet, apiBase+"/latest", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return rel, err
|
return rel, err
|
||||||
}
|
}
|
||||||
req.Header.Set("Accept", "application/vnd.github+json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", "LazyRun")
|
req.Header.Set("User-Agent", "LazyRun")
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
@@ -62,7 +62,7 @@ func Latest() (Release, error) {
|
|||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
return rel, fmt.Errorf("GitHub menjawab %s", resp.Status)
|
return rel, fmt.Errorf("Gitea menjawab %s", resp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
var payload struct {
|
var payload struct {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ func TestNewerIgnoresSameAndOlder(t *testing.T) {
|
|||||||
func TestLatestParsesRelease(t *testing.T) {
|
func TestLatestParsesRelease(t *testing.T) {
|
||||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Header.Get("User-Agent") == "" {
|
if r.Header.Get("User-Agent") == "" {
|
||||||
t.Error("GitHub butuh header User-Agent")
|
t.Error("Gitea butuh header User-Agent")
|
||||||
}
|
}
|
||||||
_, _ = w.Write([]byte(`{
|
_, _ = w.Write([]byte(`{
|
||||||
"tag_name": "v1.2.0",
|
"tag_name": "v1.2.0",
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Setiap kali membuat shortcut, pengguna memilih lokasi via **checkbox** yang flek
|
|||||||
|
|
||||||
- Bundle AppImage dengan dukungan **zsync**.
|
- Bundle AppImage dengan dukungan **zsync**.
|
||||||
- Menu **"Check for Updates"** memanggil `AppImageUpdate`.
|
- Menu **"Check for Updates"** memanggil `AppImageUpdate`.
|
||||||
- Update otomatis dari GitHub Releases.
|
- Update otomatis dari Gitea Releases.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user