forked from Spagett1/pineflash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-release.sh
executable file
·61 lines (57 loc) · 1.99 KB
/
generate-release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
ver=$(grep "^version" Cargo.toml | cut -d\" -f2)
files="target/release/pineflash=/usr/bin/pineflash assets/Pineflash.desktop=/usr/share/applications/Pineflash.desktop assets/pine64logo.png=/usr/share/pixmaps/pine64logo.png LICENSE=/usr/share/licenses/pineflash/LICENSE"
arch="x86_64"
cargo build --release
cargo build --target x86_64-pc-windows-gnu --release
# Generate windows release
# Update version number
sed -i "s/#define MyAppVersion.*/#define MyAppVersion \"$ver\"/g" ./Package_Windows_Release.iss
wine /home/spagett/.wine/drive_c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe ./Package_Windows_Release.iss
mv PineFlash_Installer.exe pineflash-$ver-win64.exe
# Generate rpm release
fpm -s dir -t rpm \
--name pineflash \
--license gpl2 \
--version $ver \
--architecture $arch \
--depends polkit \
--description "Flashing tool for pinecil soldering irons." \
--url "https://github.com/Spagett1/PineFlash" \
--maintainer "Spagett <[email protected]>" \
$files
# Generate deb release
fpm -s dir -t deb \
--name pineflash \
--license gpl2 \
--version $ver \
--architecture $arch \
--depends polkit \
--description "Flashing tool for pinecil soldering irons." \
--url "https://github.com/Spagett1/PineFlash" \
--maintainer "Spagett <[email protected]>" \
$files
# Generate arch release
fpm -s dir -t pacman \
--name pineflash \
--license gpl2 \
--version $ver \
--architecture $arch \
--depends polkit \
--description "Flashing tool for pinecil soldering irons." \
--url "https://github.com/Spagett1/PineFlash" \
--maintainer "Spagett <[email protected]>" \
$files
# Generate generic release
fpm -s dir -t tar \
--name pineflash \
--license gpl2 \
--version $ver \
--architecture $arch \
--depends polkit \
--description "Flashing tool for pinecil soldering irons." \
--url "https://github.com/Spagett1/PineFlash" \
--maintainer "Spagett <[email protected]>" \
$files
mv pineflash.tar pineflash-$ver-1-x86_64.tar
xz pineflash-$ver-1-x86_64.tar