Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 25bae10

Browse files
osfanbuff63tuxinal
andauthored
✨ Redo config system with TOML (#69)
Co-authored-by: Tuxinal <[email protected]>
1 parent 7bcc651 commit 25bae10

File tree

12 files changed

+204
-148
lines changed

12 files changed

+204
-148
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
*.sh eol=lf
77
*.pyc binary
88

9+
.vscode/*.json linguist-language=jsonc
910
*.all-contributorsrc linguist-language=json

.github/workflows/ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,22 @@ jobs:
7272
- name: Install dependencies
7373
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
7474
run: poetry install --no-interaction --no-root
75+
- name: Shorten commit SHA
76+
uses: benjlevesque/[email protected]
77+
id: short-sha
7578
- name: Build
7679
run: poetry build --no-interaction
7780

81+
- name: Get normalized branch name
82+
run: |
83+
RAW_BRANCH=${{ github.ref_name || github.head_ref }}
84+
BRANCH=${RAW_BRANCH//\//-}
85+
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
7886
- name: Upload built wheels
7987
uses: actions/upload-artifact@v3
8088
with:
81-
name: Vanilla Installer ${{ github.head_ref || github.ref_name }}+{{ steps.short-sha.outputs.sha }} (Python binaries)
82-
path: dist/*
89+
name: Vanilla Installer ${{ env.BRANCH }}+${{ steps.short-sha.outputs.sha }} (Windows)
90+
path: "dist/*"
8391

8492
build-windows:
8593
name: Build Windows exe
@@ -110,16 +118,22 @@ jobs:
110118
setup-python: false
111119
aqtversion: ==3.1.*
112120
py7zrversion: ==0.20.*
113-
- name: Install dependencies
121+
- name: Get normalized branch name
122+
shell: bash
123+
run: |
124+
RAW_BRANCH=${{ github.ref_name || github.head_ref }}
125+
BRANCH=${RAW_BRANCH//\//-}
126+
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
127+
- name: Install dependencies and build
114128
run: |
115129
pipx run poetry install --no-interaction --with compile
116130
./.venv/Scripts/activate.ps1
117131
pip install nuitka minecraft_launcher_lib PySide6 click tomli darkdetect
118-
python -m nuitka --standalone --onefile --windows-icon-from-ico=media/icon.ico --output-dir=build --include-package=minecraft_launcher_lib,PySide6,click,tomli,darkdetect -o "Vanilla Installer-GUI ${{ github.head_ref || github.ref_name }}+{{ steps.short-sha.outputs.sha }}.exe" --enable-plugin=pyside6 --include-data-dir=vanilla_installer/assets=assets/ --disable-console vanilla_installer/gui.py --assume-yes-for-downloads
132+
python -m nuitka --standalone --onefile --windows-icon-from-ico=media/icon.ico --output-dir=build --include-package=minecraft_launcher_lib,PySide6,click,tomli,darkdetect -o "Vanilla Installer-GUI ${{ env.BRANCH }}+${{ steps.short-sha.outputs.sha }}.exe" --enable-plugin=pyside6 --include-data-dir=vanilla_installer/assets=assets/ --disable-console vanilla_installer/gui.py --assume-yes-for-downloads
119133
- name: Upload built executable
120134
uses: actions/upload-artifact@v3
121135
with:
122-
name: Vanilla Installer ${{ github.head_ref || github.ref_name }}+{{ steps.short-sha.outputs.sha }} (Windows)
136+
name: Vanilla Installer ${{ env.BRANCH }}+${{ steps.short-sha.outputs.sha }} (Windows)
123137
path: "*.exe"
124138

125139
# build-macos:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ disticon.png
99
*.whl
1010
cx_Logging-doc/
1111

12+
# Configuration
13+
vanilla_installer.toml
14+
1215
# Editors
1316
.vscode/launch.json
1417

.vscode/settings.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,5 @@
1616
},
1717
"hide-files.files": [
1818
"vanilla_installer/__pycache__"
19-
],
20-
"cSpell.words": [
21-
"authdata",
22-
"modpack",
23-
"nobackslash"
24-
]// ,
25-
// "python.testing.pytestArgs": [
26-
// "."
27-
// ],
28-
// "python.testing.unittestEnabled": false,
29-
// "python.testing.pytestEnabled": true .
19+
]
3020
}

SECURITY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7-
| release | :white_check_mark: |
8-
| beta/alpha | :x: |
7+
| 0.x | :white_check_mark: |
98

109
## Reporting a Vulnerability
1110

poetry.lock

Lines changed: 49 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ tomlkit = "^0.11.6"
3030
[tool.poetry.group.dev.dependencies]
3131
pylint = "^2.16.1"
3232
black = "^22.10.0"
33+
isort = "^5.11.4"
3334

3435

3536
[tool.poetry.group.ci.dependencies]

0 commit comments

Comments
 (0)