Skip to content

Commit cbfc2d7

Browse files
authored
Refactor self-update to upgrade command (#209)
2 parents d734cb2 + 40c1b77 commit cbfc2d7

22 files changed

+1199
-804
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## v1.8.0-alpha
5+
### BREAKING CHANGES
6+
This release removes the `self-update` command to use `upgrade` command instead for better clarity and consistency. Also, upgrade command now removed the rich progress bar and use simple text-based progress updates to improve performance and reduce resource consumption.
7+
8+
### Migration guide
9+
Please update manually with setup.sh script. Run the following commands in your terminal:
10+
11+
```bash
12+
git clone https://github.com/Cyber-Syntax/my-unicorn.git
13+
cd my-unicorn
14+
./setup.sh
15+
```
16+
417
## v1.7.4-alpha
518
## v1.7.3-alpha
619
## v1.7.2-alpha

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ Turkish: [README.tr.md](README.tr.md)
3939

4040
```bash
4141
cd my-unicorn &
42-
sh my-unicorn-installer.sh install
42+
sh setup.sh install
4343
```
4444

4545
3. Add autocomplete (optional):
4646

4747
```bash
4848
# auto-detect your shell and install autocomplete
49-
sh my-unicorn-installer.sh autocomplete
49+
sh setup.sh autocomplete
5050
5151
# or manually add autocomplete for bash or zsh
52-
sh my-unicorn-installer.sh autocomplete bash
53-
sh my-unicorn-installer.sh autocomplete zsh
52+
sh setup.sh autocomplete bash
53+
sh setup.sh autocomplete zsh
5454
```
5555

5656
4. Start using my-unicorn:

README.tr.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
English Description: [README.md](README.md)
22

33
> [!CAUTION]
4-
> Bu proje sınırlı testlerden dolayı şu anlık **alpha aşamasındadır**.
4+
> Bu proje sınırlı testlerden dolayı şu anlık **alpha aşamasındadır**.
55
>
66
> **Önemli:** Script’i güncellerken **Releases** bölümündeki talimatları takip edin.
77
>
@@ -10,15 +10,15 @@ English Description: [README.md](README.md)
1010
## **🦄 my-unicorn Hakkında**
1111

1212
> [!NOTE]
13-
> Manuel AppImage güncelleme sürecinden yılmıştım, süreci otomatikleştirmek için bu projeyi oluşturdum.
13+
> Manuel AppImage güncelleme sürecinden yılmıştım, süreci otomatikleştirmek için bu projeyi oluşturdum.
1414
>
15-
> Detaylı bilgi: [wiki.md](docs/wiki.md)
15+
> Detaylı bilgi: [wiki.md](docs/wiki.md)
1616
1717
- **Desteklenen Uygulamalar:**
1818
- Super-Productivity, Siyuan, Joplin, Standard-notes, Logseq, QOwnNotes, Tagspaces, Zen-Browser, weektodo, Zettlr
1919
- Doğrulaması olmayan uygulamalar (yazılımcıları hash sağlamıyor):
2020
- FreeTube
21-
- Bağlantılı sorun: https://github.com/FreeTubeApp/FreeTube/issues/4720)
21+
- Bağlantılı sorun: <https://github.com/FreeTubeApp/FreeTube/issues/4720>)
2222
- AppFlowy
2323
- Obsidian
2424
- Daha fazlası [apps](my_unicorn/apps/) klasöründe bulunabilir.
@@ -41,10 +41,10 @@ English Description: [README.md](README.md)
4141

4242
```bash
4343
cd my-unicorn &
44-
sh my-unicorn-installer.sh install
44+
sh setup.sh install
4545
```
46-
47-
## Paketi kaldır:
46+
47+
## Paketi kaldır
4848

4949
> [!TIP]
5050
> Eğer paketi küresel olarak yüklediyseniz, aşağıdaki komutu kullanarak kaldırabilirsiniz:
@@ -55,7 +55,7 @@ English Description: [README.md](README.md)
5555

5656
# Nasıl Kullanılır?
5757

58-
## Paket olarak kullanım:
58+
## Paket olarak kullanım
5959

6060
```bash
6161
my-unicorn --help # to see the command options
@@ -91,25 +91,24 @@ my-unicorn migrate --clean # Migrate configuration files
9191
my-unicorn migrate --force # Migrate configuration without confirmation
9292
```
9393

94-
95-
## Desteklenmeyen uygulamalar için (URL ile kurulum):
94+
## Desteklenmeyen uygulamalar için (URL ile kurulum)
9695

9796
> [!IMPORTANT]
9897
> Eğer desteklenmeyen bir uygulamayı kurmak istiyorsanız, uygulama hakkında bazı bilgilere sahip olmanız gerekecektir.
9998

10099
- **GitHub URL:** Uygulamanın GitHub depo adresi (örn. `https://github.com/johannesjo/super-productivity`).
101100
- Hash türü ve Hash dosya adı otamatik olarak tespit edilir. Eğer uygulamanın uyumluluğu yoksa veya hata oluşursa aşağıdaki bilgileri sağlamanız gerekecek:
102-
- **Hash türü:** Hash türünü belirtin (örn. super-productivity için sha512).
103-
- **Hash doğrulama sorunları:** Eğer hash doğrulama başarısız olursa, hash'i manuel olarak JSON dosyasına ekleyebilirsiniz:
104-
- En son hash bilgisini GitHub sürüm sayfasında bulabilirsiniz (örn. [super-productivity releases](https://github.com/johannesjo/super-productivity/releases)).
105-
- Örnekler için [apps](my_unicorn/apps/) klasörüne bakabilirsiniz.
101+
- **Hash türü:** Hash türünü belirtin (örn. super-productivity için sha512).
102+
- **Hash doğrulama sorunları:** Eğer hash doğrulama başarısız olursa, hash'i manuel olarak JSON dosyasına ekleyebilirsiniz:
103+
- En son hash bilgisini GitHub sürüm sayfasında bulabilirsiniz (örn. [super-productivity releases](https://github.com/johannesjo/super-productivity/releases)).
104+
- Örnekler için [apps](my_unicorn/apps/) klasörüne bakabilirsiniz.
106105
107106
# **🙏 Bu Projeye Destek Olun**
108107
109108
- **GitHub üzerinde yıldız ⭐** vererek desteğinizi gösterebilirsiniz, böylece kodlama yolculuğumda motive olmamı sağlar!
110109
- **Test:** Eğer betiği test eder ve karşılaştığınız herhangi bir sorun hakkında geri bildirim sağlayabilirseniz harika olur.
111110
- **💖 Projeyi Destekle:** Çalışmalarımı desteklemek ve projeler yapmaya devam etmemi sağlamak istersen, bana sponsor olmayı düşünebilirsin:
112-
- [![Sponsor Ol](https://img.shields.io/badge/Sponsor-💖-brightgreen)](https://github.com/sponsors/Cyber-Syntax)
111+
- [![Sponsor Ol](https://img.shields.io/badge/Sponsor-💖-brightgreen)](https://github.com/sponsors/Cyber-Syntax)
113112
114113
## **🤝 Katkı Sağlama**
115114

autocomplete/bash_autocomplete

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ _my_unicorn_completion() {
1010
prev="${COMP_WORDS[COMP_CWORD-1]}"
1111

1212
# Available commands
13-
commands="install update self-update list remove backup cache auth config"
13+
commands="install update upgrade list remove backup cache auth config"
1414

1515
# Global options
1616
local global_opts="--help --version"
1717

1818
# Command-specific options
1919
local install_opts="--concurrency --no-icon --no-verify --no-desktop --verbose --help"
2020
local update_opts="--check-only --refresh-cache --verbose --help"
21-
local self_update_opts="--check-only --help"
21+
local upgrade_opts="--check-only --help"
2222
local list_opts="--available --help"
2323
local remove_opts="--keep-config --help"
2424
local backup_opts="--restore-last --restore-version --list-backups --cleanup --info --migrate --help"
@@ -61,8 +61,8 @@ _my_unicorn_completion() {
6161
COMPREPLY=()
6262
fi
6363
;;
64-
self-update)
65-
mapfile -t COMPREPLY < <(compgen -W "${self_update_opts}" -- "${cur}")
64+
upgrade)
65+
mapfile -t COMPREPLY < <(compgen -W "${upgrade_opts}" -- "${cur}")
6666
;;
6767
list)
6868
mapfile -t COMPREPLY < <(compgen -W "${list_opts}" -- "${cur}")

autocomplete/zsh_autocomplete

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ _my_unicorn() {
1111
commands=(
1212
'install:Install AppImages from catalog or URLs'
1313
'update:Update installed AppImages'
14-
'self-update:Update my-unicorn itself from GitHub'
14+
'upgrade:Upgrade my-unicorn itself'
1515
'list:List installed AppImages'
1616
'remove:Remove installed AppImages'
1717
'backup:Manage AppImage backups and restore'
@@ -52,9 +52,9 @@ _my_unicorn() {
5252
'--help[Show help information]' \
5353
'1:app app:_files'
5454
;;
55-
self-update)
55+
upgrade)
5656
_arguments \
57-
'(--check-only)--check-only[Only check for updates without installing]' \
57+
'(--check-only)--check-only[Only check for upgrades without installing]' \
5858
'--help[Show help information]' \
5959
'1:app app:_files'
6060
;;

docs/wiki.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@
3434

3535
## Helper scripts
3636

37-
- my-unicorn-installer.sh: A script to install my-unicorn and its dependencies.
37+
- setup.sh: A script to install my-unicorn and its dependencies.
3838
- It sets up a virtual environment and installs the required Python packages.
3939
- venv-wrapper.bash: Wrapper script around my-unicorn using the python virtual environment
4040
- update.bash: A script to automate process of checking for updates and updating my-unicorn itself.
4141

4242
## 🛠️ Usage Examples
4343

44-
### my-unicorn self-update
44+
### my-unicorn upgrade
4545

4646
```bash
47-
# Check for update
48-
my-unicorn self-update --check-only
47+
# Check for upgrade
48+
my-unicorn upgrade --check-only
4949

50-
# Update my-unicorn
51-
my-unicorn self-update
50+
# Upgrade my-unicorn
51+
my-unicorn upgrade
5252
```
5353

5454
### Installation
@@ -170,7 +170,7 @@ my-unicorn backup --migrate
170170
### Required Dependencies
171171

172172
> [!TIP]
173-
> These dependencies are already installed when you used my-unicorn-installer.sh to install my-unicorn.
173+
> These dependencies are already installed when you used setup.sh to install my-unicorn.
174174
175175
```bash
176176
pip install aiohttp uvloop keyring orjson packaging rich

0 commit comments

Comments
 (0)