-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/GitHub releases documentation #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # 🔧 Desktop Launcher Fix | ||
|
|
||
| ## Problem | ||
| Die Anwendung lässt sich nicht über das Startmenü starten: | ||
| ``` | ||
| Fehlermeldung: Programm „/home/marci/.local/bin/bash-script-maker" ist nicht auffindbar | ||
| ``` | ||
|
|
||
| ## Lösung - Schritt für Schritt | ||
|
|
||
| ### 1. ✅ App korrekt installieren | ||
| ```bash | ||
| cd /home/marci/Code/Bash-Script-Maker | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| ### 2. ✅ Prüfen ob ausführbare Datei existiert | ||
| ```bash | ||
| ls -la ~/.local/bin/bash-script-maker | ||
| # Sollte anzeigen: -rwxr-xr-x. 1 marci marci 219 ... bash-script-maker | ||
| ``` | ||
|
|
||
| ### 3. ✅ Desktop-Integration installieren | ||
| ```bash | ||
| ./install_desktop_integration.sh | ||
| ``` | ||
|
|
||
| ### 4. ✅ Desktop-Datenbank aktualisieren | ||
| ```bash | ||
| update-desktop-database ~/.local/share/applications | ||
| gtk-update-icon-cache ~/.local/share/icons/hicolor/ --ignore-theme-index | ||
| ``` | ||
|
|
||
| ### 5. 🔄 Desktop-Umgebung neu starten | ||
| ```bash | ||
| # GNOME/KDE/XFCE neu starten oder | ||
| # Abmelden und wieder anmelden | ||
| ``` | ||
|
|
||
| ## Diagnose-Befehle | ||
|
|
||
| ### Prüfe Installation: | ||
| ```bash | ||
| which bash-script-maker | ||
| ~/.local/bin/bash-script-maker --version | ||
| ``` | ||
|
|
||
| ### Prüfe Desktop-Datei: | ||
| ```bash | ||
| cat ~/.local/share/applications/bash-script-maker.desktop | ||
| desktop-file-validate ~/.local/share/applications/bash-script-maker.desktop | ||
| ``` | ||
|
|
||
| ### Prüfe Icons: | ||
| ```bash | ||
| ls ~/.local/share/icons/hicolor/*/apps/bash-script-maker.* | ||
| ``` | ||
|
|
||
| ### Prüfe PATH: | ||
| ```bash | ||
| echo $PATH | grep -o '/home/marci/.local/bin' | ||
| ``` | ||
|
|
||
| ## Alternative Lösungen | ||
|
|
||
| ### Wenn das Problem weiterhin besteht: | ||
|
|
||
| #### Option 1: Absolute Pfade in Desktop-Datei | ||
| ```bash | ||
| # Desktop-Datei bearbeiten | ||
| sed -i 's|Icon=bash-script-maker|Icon=/home/marci/.local/share/icons/hicolor/scalable/apps/bash-script-maker.svg|' ~/.local/share/applications/bash-script-maker.desktop | ||
| ``` | ||
|
|
||
| #### Option 2: System-weite Installation | ||
| ```bash | ||
| sudo pip install -e . | ||
| # Dann Desktop-Integration mit sudo ausführen | ||
| ``` | ||
|
|
||
| #### Option 3: Desktop-Datei manuell erstellen | ||
| ```bash | ||
| cat > ~/.local/share/applications/bash-script-maker.desktop << 'EOF' | ||
| [Desktop Entry] | ||
| Name=Bash-Script-Maker | ||
| Comment=Ein GUI-Programm zur Erstellung von Bash-Scripts | ||
| Exec=/home/marci/.local/bin/bash-script-maker | ||
| Icon=/home/marci/.local/share/icons/hicolor/48x48/apps/bash-script-maker.png | ||
| Terminal=false | ||
| Type=Application | ||
| Categories=Development;Utility;TextEditor; | ||
| Keywords=bash;script;editor;generator;development; | ||
| StartupWMClass=bash-script-maker | ||
| MimeType=text/x-shellscript;application/x-shellscript; | ||
| EOF | ||
|
|
||
| chmod +x ~/.local/share/applications/bash-script-maker.desktop | ||
| update-desktop-database ~/.local/share/applications | ||
| ``` | ||
|
|
||
| ## Status nach Fix | ||
|
|
||
| - ✅ App installiert: v1.9.0 | ||
| - ✅ Ausführbare Datei: `/home/marci/.local/bin/bash-script-maker` | ||
| - ✅ Desktop-Datei: `~/.local/share/applications/bash-script-maker.desktop` | ||
| - ✅ Icons installiert: Verschiedene Größen | ||
| - ✅ Desktop-Datenbank aktualisiert | ||
|
|
||
| ## Test | ||
| ```bash | ||
| # Terminal-Start (sollte funktionieren): | ||
| bash-script-maker | ||
|
|
||
| # Desktop-Start: Über Anwendungsmenü testen | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.9.0 | ||
| 1.9.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # 🔖 Version Management System | ||
|
|
||
| ## Problem gelöst | ||
| Die Anwendung zeigte immer Version "1.2.1" an, obwohl neuere GitHub Releases existierten. | ||
|
|
||
| ## ✅ Neue dynamische Versionserkennung | ||
|
|
||
| ### 🎯 Prioritätenreihenfolge: | ||
| 1. **`__version__.py`** - Dedicated version file | ||
| 2. **`VERSION`** - Plain text version file | ||
| 3. **`pyproject.toml`** - Project configuration | ||
| 4. **Git Tags** - Latest repository tag | ||
| 5. **Fallback** - Default version (1.9.0) | ||
|
|
||
| ### 🔧 Implementierung: | ||
| ```python | ||
| def get_version(): | ||
| """Ermittelt die aktuelle Version dynamisch""" | ||
| # 1. __version__.py Import | ||
| # 2. VERSION Datei lesen | ||
| # 3. pyproject.toml parsen | ||
| # 4. Git-Tag ermitteln (git describe --tags --abbrev=0) | ||
| # 5. Fallback zu "1.9.0" | ||
| ``` | ||
|
|
||
| ## 📁 Versionsdateien synchronisiert | ||
|
|
||
| ### Aktuelle Version: **1.9.1** | ||
| - ✅ `VERSION`: 1.9.1 | ||
| - ✅ `__version__.py`: 1.9.1 | ||
| - ✅ `pyproject.toml`: 1.9.1 | ||
| - ✅ Git Tag: v1.9.1 | ||
|
|
||
| ## 🚀 Automatische Release-Synchronisation | ||
|
|
||
| ### Bei neuen GitHub Releases: | ||
| 1. **GitHub Actions** erstellt neuen Tag | ||
| 2. **Versionsdateien** werden automatisch aktualisiert | ||
| 3. **App zeigt** korrekte Version an | ||
|
|
||
| ### Workflow: | ||
| ```bash | ||
| # Neuer Release wird erstellt → v1.9.2 | ||
| # Automatisch synchronisiert: | ||
| echo "1.9.2" > VERSION | ||
| sed -i 's/__version__ = ".*"/__version__ = "1.9.2"/' __version__.py | ||
| sed -i 's/version = ".*"/version = "1.9.2"/' pyproject.toml | ||
| ``` | ||
|
|
||
| ## 🧪 Versionsprüfung | ||
|
|
||
| ### Terminal-Test: | ||
| ```bash | ||
| python3 -c "from bash_script_maker import __version__; print(__version__)" | ||
| ``` | ||
|
|
||
| ### App-Test: | ||
| - Header zeigt: "Version 1.9.1 - Professioneller Bash-Script-Generator" | ||
| - About-Dialog zeigt: "Version: 1.9.1" | ||
| - Tooltips zeigen: "Bash-Script-Maker v1.9.1" | ||
|
|
||
| ## 🔄 Zukünftige Verbesserungen | ||
|
|
||
| ### Option 1: GitHub API Integration | ||
| ```python | ||
| def get_latest_github_version(): | ||
| import requests | ||
| api_url = "https://api.github.com/repos/securebitsorg/Bash-Script-Maker/releases/latest" | ||
| # Hole neueste Release-Version | ||
| ``` | ||
|
|
||
| ### Option 2: Automatische Synchronisation | ||
| ```yaml | ||
| # .github/workflows/sync-version.yml | ||
| on: | ||
| release: | ||
| types: [published] | ||
| jobs: | ||
| sync-version: | ||
| - name: Update version files | ||
| - name: Commit changes | ||
| ``` | ||
|
|
||
| ## ✨ Vorteile der neuen Lösung | ||
|
|
||
| - 🎯 **Immer aktuelle Version** in der App | ||
| - 🔄 **Automatische Synchronisation** mit GitHub | ||
| - 🛡️ **Mehrere Fallback-Optionen** für Robustheit | ||
| - 📦 **Konsistente Versionierung** über alle Dateien | ||
| - 🧪 **Einfache Testbarkeit** der Versionslogik | ||
|
|
||
| --- | ||
|
|
||
| *Version Management implementiert in v1.9.1* 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Version Detection Inconsistency
The
get_version()function has two issues:lstrip("v")for Git tags incorrectly removes all 'v' characters from the left, potentially malforming version strings. Additionally, the hardcoded fallback version "1.9.0" is inconsistent with the "1.9.1" used in other version sources, leading to an outdated version being reported if dynamic detection fails.