Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20d15efc3b | ||
|
|
dfdab88b43 | ||
|
|
e771c00446 | ||
|
|
651fd0fc3d | ||
|
|
2bfed9bea3 |
No files matched your search
@@ -32,35 +32,28 @@ jobs:
|
|||||||
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
env:
|
env:
|
||||||
# GH_USER/GH_REPO dipakai build.sh untuk menyisipkan info update zsync
|
# build.sh menyisipkan info update zsync yang mengarah ke rilis di Gitea.
|
||||||
# (gh-releases-zsync|<user>|<repo>|latest|lazyrun-*.AppImage.zsync)
|
GITEA_BASE: ${{ github.server_url }}/${{ github.repository }}
|
||||||
GH_USER: ${{ github.repository_owner }}
|
|
||||||
GH_REPO: ${{ github.event.repository.name }}
|
|
||||||
run: |
|
run: |
|
||||||
VERSION="${GITHUB_REF_NAME#v}" ./build.sh
|
VERSION="${GITHUB_REF_NAME#v}" ./build.sh
|
||||||
ls -lh dist/lazyrun-*.AppImage*
|
ls -lh dist/lazyrun-*.AppImage*
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
cat > /tmp/notes.md <<'NOTES'
|
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
||||||
|
TAG="${GITHUB_REF_NAME}"
|
||||||
|
cat > /tmp/body.md <<'EOF'
|
||||||
Single-file AppImage for Linux x86_64. No root needed, everything stays in
|
Single-file AppImage for Linux x86_64. No root needed, everything stays in
|
||||||
`~/.local/` and `~/.config/lazyrun/`.
|
`~/.local/` and `~/.config/lazyrun/`.
|
||||||
|
|
||||||
```bash
|
Already using LazyRun? It upgrades itself from this release page.
|
||||||
chmod +x lazyrun-*-x86_64.AppImage
|
EOF
|
||||||
./lazyrun-*-x86_64.AppImage
|
python3 -c 'import json,sys;print(json.dumps({"tag_name":sys.argv[1],"name":"LazyRun "+sys.argv[1],"body":open(sys.argv[2]).read()}))' "$TAG" /tmp/body.md > /tmp/rel.json
|
||||||
```
|
RID=$(curl -sf -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" "$API/repos/$GITHUB_REPOSITORY/releases" --data @/tmp/rel.json | python3 -c 'import json,sys;print(json.load(sys.stdin)["id"])')
|
||||||
|
echo "release id=$RID"
|
||||||
Already using LazyRun? It checks this release page on startup and offers to
|
for f in dist/lazyrun-*.AppImage dist/lazyrun-*.AppImage.zsync; do
|
||||||
update itself (delta updates with `AppImageUpdate` when installed).
|
[ -f "$f" ] || continue
|
||||||
|
curl -sf -X POST -H "Authorization: token $TOKEN" -F "attachment=@$f" "$API/repos/$GITHUB_REPOSITORY/releases/$RID/assets?name=$(basename "$f")" -o /dev/null
|
||||||
---
|
done
|
||||||
NOTES
|
|
||||||
gh release create "$GITHUB_REF_NAME" \
|
|
||||||
dist/lazyrun-*.AppImage \
|
|
||||||
dist/lazyrun-*.AppImage.zsync \
|
|
||||||
--title "LazyRun ${GITHUB_REF_NAME}" \
|
|
||||||
--notes-file /tmp/notes.md \
|
|
||||||
--generate-notes
|
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
|
> 🪞 **Mirror.** Repo asli & pengembangan ada di **Gitea**: https://gitea.oxpoe.qzz.io/oxpoe/lazyrun
|
||||||
|
|
||||||
# LazyRun — lazy shortcut build
|
# LazyRun — lazy shortcut build
|
||||||
|
|
||||||
[](https://github.com/oxpoe/lazyrun/actions/workflows/ci.yml)
|
[](https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/actions/workflows/ci.yml)
|
||||||
[](https://github.com/oxpoe/lazyrun/releases/latest)
|
[](https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/releases)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
@@ -25,7 +27,7 @@ breathes while the app is open (the koala in `assets/logo.svg` is the mascot).*
|
|||||||
<img src="docs/main-light.png" width="49%" alt="LazyRun in light theme">
|
<img src="docs/main-light.png" width="49%" alt="LazyRun in light theme">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- **Repo:** <https://github.com/oxpoe/lazyrun>
|
- **Repo:** <https://gitea.oxpoe.qzz.io/oxpoe/lazyrun>
|
||||||
- **Donate:** <https://donasi.oxpoe.qzz.io/>
|
- **Donate:** <https://donasi.oxpoe.qzz.io/>
|
||||||
|
|
||||||
- **Executable shortcut** — picks an ELF/AppImage/script/Windows `.exe`, copies it to
|
- **Executable shortcut** — picks an ELF/AppImage/script/Windows `.exe`, copies it to
|
||||||
@@ -77,7 +79,7 @@ breathes while the app is open (the koala in `assets/logo.svg` is the mascot).*
|
|||||||
Needs a desktop Linux with the usual GL/X11 or Wayland libraries (any KDE Plasma or
|
Needs a desktop Linux with the usual GL/X11 or Wayland libraries (any KDE Plasma or
|
||||||
GNOME install has them). No root, nothing outside your home directory.
|
GNOME install has them). No root, nothing outside your home directory.
|
||||||
|
|
||||||
Download the AppImage from [Releases](https://github.com/oxpoe/lazyrun/releases), then:
|
Download the AppImage from [Releases](https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/releases), then:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chmod +x lazyrun-*-x86_64.AppImage
|
chmod +x lazyrun-*-x86_64.AppImage
|
||||||
@@ -126,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
|
||||||
@@ -165,7 +167,7 @@ GH_USER=oxpoe GH_REPO=lazyrun ./build.sh
|
|||||||
Desktop copy, import/export, dark mode.
|
Desktop copy, import/export, dark mode.
|
||||||
- Firefox PWA via `--kiosk`, Flatpak/Snap targets, icon preview.
|
- Firefox PWA via `--kiosk`, Flatpak/Snap targets, icon preview.
|
||||||
|
|
||||||
Known limitations are tracked as [issues](https://github.com/oxpoe/lazyrun/issues);
|
Known limitations are tracked as [issues](https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/issues);
|
||||||
the main ones:
|
the main ones:
|
||||||
|
|
||||||
- the type label (`Go`, `Electron`, …) is detected when the shortcut is created, so a
|
- the type label (`Go`, `Electron`, …) is detected when the shortcut is created, so a
|
||||||
|
|||||||
@@ -39,12 +39,8 @@ export ARCH
|
|||||||
export LINUXDEPLOY_OUTPUT_APP_NAME=lazyrun
|
export LINUXDEPLOY_OUTPUT_APP_NAME=lazyrun
|
||||||
export LINUXDEPLOY_OUTPUT_VERSION="$VERSION"
|
export LINUXDEPLOY_OUTPUT_VERSION="$VERSION"
|
||||||
export LDAI_OUTPUT="$PWD/$OUT/lazyrun-$VERSION-$ARCH.AppImage"
|
export LDAI_OUTPUT="$PWD/$OUT/lazyrun-$VERSION-$ARCH.AppImage"
|
||||||
if [[ -n "${GH_USER:-}" && -n "${GH_REPO:-}" ]]; then
|
GITEA_BASE="${GITEA_BASE:-https://gitea.oxpoe.qzz.io/oxpoe/lazyrun}"
|
||||||
export LDAI_UPDATE_INFORMATION="gh-releases-zsync|$GH_USER|$GH_REPO|latest|lazyrun-*.AppImage.zsync"
|
export LDAI_UPDATE_INFORMATION="zsync|$GITEA_BASE/releases/download/v$VERSION/lazyrun-$VERSION-$ARCH.AppImage.zsync"
|
||||||
else
|
|
||||||
echo "==> catatan: GH_USER/GH_REPO kosong, AppImage tanpa update info zsync"
|
|
||||||
export LDAI_NO_APPSTREAM=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Library X11/Wayland/xkb/cursor tidak boleh ikut dibundel: kalau versinya beda
|
# Library X11/Wayland/xkb/cursor tidak boleh ikut dibundel: kalau versinya beda
|
||||||
# dengan host, cursor & rendering jadi tidak native (mis. cursor theme desktop tidak terpakai).
|
# dengan host, cursor & rendering jadi tidak native (mis. cursor theme desktop tidak terpakai).
|
||||||
|
|||||||
+1
-1
@@ -12,5 +12,5 @@ var version = "dev"
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cursor.Apply() // sebelum app dibuat: GLFW membaca env cursor saat init
|
cursor.Apply() // sebelum app dibuat: GLFW membaca env cursor saat init
|
||||||
ui.Run(app.NewWithID("io.github.lazyrun.LazyRun"), version)
|
ui.Run(app.NewWithID("io.oxpoe.lazyrun.LazyRun"), version)
|
||||||
}
|
}
|
||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"lazyrun/internal/store"
|
"lazyrun/internal/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Link aplikasi: repo GitHub LazyRun dan halaman donasi.
|
// Link aplikasi: repo Gitea LazyRun dan halaman donasi.
|
||||||
const (
|
const (
|
||||||
repoURL = "https://github.com/oxpoe/lazyrun"
|
repoURL = "https://gitea.oxpoe.qzz.io/oxpoe/lazyrun"
|
||||||
donateURL = "https://donasi.oxpoe.qzz.io/"
|
donateURL = "https://donasi.oxpoe.qzz.io/"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ var tr = map[string][2]string{
|
|||||||
"need_target": {"Pick at least one location: menu or desktop.", "Pilih minimal satu lokasi: menu atau desktop."},
|
"need_target": {"Pick at least one location: menu or desktop.", "Pilih minimal satu lokasi: menu atau desktop."},
|
||||||
"no_browser": {"No supported browser found. Install Chrome, Chromium, Brave, Edge, Vivaldi, or Firefox first.", "Browser yang didukung tidak ditemukan. Install Chrome, Chromium, Brave, Edge, Vivaldi, atau Firefox dulu."},
|
"no_browser": {"No supported browser found. Install Chrome, Chromium, Brave, Edge, Vivaldi, or Firefox first.", "Browser yang didukung tidak ditemukan. Install Chrome, Chromium, Brave, Edge, Vivaldi, atau Firefox dulu."},
|
||||||
|
|
||||||
"github": {"GitHub", "GitHub"},
|
"github": {"Gitea", "Gitea"},
|
||||||
"donate": {"Donate", "Donasi"},
|
"donate": {"Donate", "Donasi"},
|
||||||
"check_updates": {"Check for Updates", "Cek Update"},
|
"check_updates": {"Check for Updates", "Cek Update"},
|
||||||
|
|
||||||
|
|||||||
@@ -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 (
|
||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
apiBase = "https://api.github.com/repos/oxpoe/lazyrun/releases"
|
apiBase = "https://gitea.oxpoe.qzz.io/api/v1/repos/oxpoe/lazyrun/releases"
|
||||||
repoURL = "https://github.com/oxpoe/lazyrun"
|
repoURL = "https://gitea.oxpoe.qzz.io/oxpoe/lazyrun"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LAZYRUN_UPDATE_API bisa dipakai untuk mengarahkan cek update ke server lain
|
// LAZYRUN_UPDATE_API bisa dipakai untuk mengarahkan cek update ke server lain
|
||||||
@@ -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,12 +46,12 @@ 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",
|
||||||
"body": " - ikon online\n - animasi ",
|
"body": " - ikon online\n - animasi ",
|
||||||
"html_url": "https://github.com/oxpoe/lazyrun/releases/tag/v1.2.0",
|
"html_url": "https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/releases/tag/v1.2.0",
|
||||||
"assets": [
|
"assets": [
|
||||||
{"name": "lazyrun-1.2.0-x86_64.AppImage.zsync", "browser_download_url": "https://contoh/zsync"},
|
{"name": "lazyrun-1.2.0-x86_64.AppImage.zsync", "browser_download_url": "https://contoh/zsync"},
|
||||||
{"name": "lazyrun-1.2.0-x86_64.AppImage", "browser_download_url": "https://contoh/appimage"}
|
{"name": "lazyrun-1.2.0-x86_64.AppImage", "browser_download_url": "https://contoh/appimage"}
|
||||||
@@ -61,7 +61,7 @@ func TestLatestParsesRelease(t *testing.T) {
|
|||||||
defer srv.Close()
|
defer srv.Close()
|
||||||
|
|
||||||
SetEndpoint(srv.URL)
|
SetEndpoint(srv.URL)
|
||||||
t.Cleanup(func() { SetEndpoint("https://api.github.com/repos/oxpoe/lazyrun/releases") })
|
t.Cleanup(func() { SetEndpoint("https://gitea.oxpoe.qzz.io/api/v1/repos/oxpoe/lazyrun/releases") })
|
||||||
|
|
||||||
rel, err := Latest()
|
rel, err := Latest()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ ln -s usr/bin/lazyrun lazyrun.AppDir/AppRun
|
|||||||
|
|
||||||
# 3. Build AppImage dengan dukungan update
|
# 3. Build AppImage dengan dukungan update
|
||||||
./appimagetool-x86_64.AppImage \
|
./appimagetool-x86_64.AppImage \
|
||||||
-u "gh-releases-zsync|user|lazyrun|latest|lazyrun-*.AppImage.zsync" \
|
-u "zsync|https://gitea.oxpoe.qzz.io/oxpoe/lazyrun/releases/download/<tag>/lazyrun-<ver>-x86_64.AppImage.zsync" \
|
||||||
lazyrun.AppDir
|
lazyrun.AppDir
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user