Skip to content

Commit ed63712

Browse files
committed
fix: distribute source scripts instead of compiled binaries for better portability
1 parent d2b2266 commit ed63712

File tree

3 files changed

+25
-32
lines changed

3 files changed

+25
-32
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,19 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v4
1313

14-
- name: Install shc
14+
- name: Create source archive
1515
run: |
16-
sudo apt-get update
17-
sudo apt-get install -y shc
18-
19-
- name: Build compiled scripts
20-
run: bash build.sh
21-
22-
- name: Create archive
23-
run: |
24-
cd dist
25-
tar -czf ../compiled-scripts.tar.gz *
16+
mkdir -p release
17+
cp -r src/* release/
18+
cd release
19+
tar -czf ../init-mac-scripts.tar.gz *
2620
cd ..
27-
ls -lh compiled-scripts.tar.gz
21+
ls -lh init-mac-scripts.tar.gz
2822
2923
- name: Create release
3024
uses: softprops/action-gh-release@v1
3125
with:
32-
files: compiled-scripts.tar.gz
26+
files: init-mac-scripts.tar.gz
3327
draft: false
3428
prerelease: false
3529
env:

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# init_computer
1+
# init_mac
22

33
Simple repo pour ré-installer plus vite un ordinateur neuf (macOS, Windows, Linux).
44

55
## Installation rapide
66

7-
### Via les releases compilées (recommandé)
7+
### Via les releases (recommandé)
88

9-
Télécharger la dernière release compilée :
9+
Télécharger la dernière release :
1010
```bash
11-
curl -fsSL -o init_computer.tar.gz \
12-
https://github.com/axgd-code/init_computer/releases/download/$(curl -s https://api.github.com/repos/axgd-code/init_computer/releases/latest | grep tag_name | cut -d'"' -f4)/compiled-scripts.tar.gz
13-
tar -xzf init_computer.tar.gz
11+
curl -fsSL -o init-mac.tar.gz \
12+
https://github.com/axgd-code/init_mac/releases/download/$(curl -s https://api.github.com/repos/axgd-code/init_mac/releases/latest | grep tag_name | cut -d'"' -f4)/init-mac-scripts.tar.gz
13+
tar -xzf init-mac.tar.gz
1414
bash init.sh
1515
```
1616

17-
Ou télécharger manuellement depuis [releases](https://github.com/axgd-code/init_computer/releases), puis :
17+
Ou télécharger manuellement depuis [releases](https://github.com/axgd-code/init_mac/releases), puis :
1818
```bash
19-
tar -xzf compiled-scripts.tar.gz
19+
tar -xzf init-mac-scripts.tar.gz
2020
bash init.sh
2121
```
2222

2323
### Depuis le code source
2424

2525
Cloner et exécuter depuis les sources :
2626
```bash
27-
git clone https://github.com/axgd-code/init_computer.git
28-
cd init_computer
27+
git clone https://github.com/axgd-code/init_mac.git
28+
cd init_mac
2929
bash src/init.sh
3030
```
3131

@@ -376,28 +376,27 @@ Le script vérifie :
376376

377377
### Build local
378378

379-
Compiler les scripts localement (nécessite `shc`) :
379+
Créer une archive locale des scripts :
380380
```bash
381-
bash build.sh
381+
tar -czf init-mac-scripts.tar.gz -C src .
382382
```
383-
Les binaires et configuration apparaissent dans [dist](dist).
384383

385384
### GitHub Actions CI
386385

387-
- [.github/workflows/ci.yml](.github/workflows/ci.yml) : à chaque push, compile et publie `compiled-scripts` comme artefact
388-
- [.github/workflows/release.yml](.github/workflows/release.yml) : à chaque tag `v*`, crée une release GitHub avec les binaires compilés
386+
- [.github/workflows/ci.yml](.github/workflows/ci.yml) : à chaque push, compile et publie les scripts comme artefact
387+
- [.github/workflows/release.yml](.github/workflows/release.yml) : à chaque tag `v*`, crée une release GitHub avec les scripts
389388

390389
### Créer une release
391390

392391
1. Mettre à jour [VERSION](VERSION)
393392
2. Commiter
394393
3. Créer un tag et pousser :
395394
```bash
396-
git tag v1.0.0
397-
git push origin v1.0.0
395+
git tag v1.0.1
396+
git push origin v1.0.1
398397
```
399398

400-
GitHub Actions compile et publie la release automatiquement.
399+
GitHub Actions crée la release automatiquement.
401400

402401
## License
403402

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
1.0.1

0 commit comments

Comments
 (0)