Skip to content

Commit 5d7e72f

Browse files
Merge pull request #2 from EnumeratedDev/debian
Merge debian and CI/CD changes
2 parents da463b3 + 5ba86fd commit 5d7e72f

8 files changed

Lines changed: 148 additions & 1 deletion

File tree

‎.github/workflows/ci_cd.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI/CD pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Fetch repository
16+
uses: actions/checkout@v6
17+
- name: Upgrade packages
18+
run: sudo apt update -y && sudo apt upgrade -y
19+
- name: Download and install dependencies
20+
run: sudo apt install -y make golang libgl-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
21+
- name: Build using make
22+
run: make PREFIX=/usr SYSCONFDIR=/etc
23+
- name: Install to root using make
24+
run: sudo make PREFIX=/usr SYSCONFDIR=/etc install
25+
- name: Run stormfetch
26+
run: stormfetch
27+
publish:
28+
runs-on: ubuntu-latest
29+
needs: test
30+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && needs.test.result == 'success'
31+
steps:
32+
- name: Fetch repository
33+
uses: actions/checkout@v6
34+
- name: Check debian changelog version
35+
run: test $(grep '^stormfetch' debian/changelog | head -n1 | grep -Po '(?<=\().*(?=\))' | cut -d '-' -f1) == ${{ github.ref_name }}
36+
- name: Upgrade packages
37+
run: sudo apt update -y && sudo apt upgrade -y
38+
- name: Download and install dependencies
39+
run: sudo apt install -y make debhelper golang libgl-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
40+
- name: Build deb package
41+
run: dpkg-buildpackage -b
42+
- name: Read changelog
43+
id: read_changelog
44+
run: |
45+
r=$(cat CHANGELOG.md) # Read CHANGELOG.md
46+
r="${r//'%'/'%25'}" # Multiline escape sequences for %
47+
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
48+
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
49+
echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT # Set environment variable
50+
- name: Upload deb packages release
51+
uses: svenstaro/upload-release-action@v2
52+
with:
53+
repo_token: ${{ secrets.GITHUB_TOKEN }}
54+
release_name: v${{ github.ref_name }}
55+
file: ../*.deb
56+
tag: ${{ github.ref }}
57+
overwrite: true
58+
file_glob: true
59+
draft: true
60+
body: |
61+
${{ steps.read_changelog.outputs.RELEASE_BODY }}

‎.gitignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Ignore IDE directories
2+
/.idea
3+
4+
# Ignore build directories
5+
/build
6+
/deb/temp
7+
/deb/out
8+
9+
# Ignore act files
10+
event.json

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Stormfetch v8.0 Changelog
2+
### Changes:
3+
- [Add CI/CD pipeline](https://github.com/EnumeratedDev/stormfetch/commit/c712f1528af45fcd7859b28b084c3dce64d6e07c)
4+
- [Add debian package source](https://github.com/EnumeratedDev/stormfetch/commit/f04a4b000a419181dd5eb940440676260beaae5f)
5+
- [Separate monitor detection code into different program](https://github.com/EnumeratedDev/stormfetch/commit/da463b35e36eb4413d6ffc258f12398015fedb2b)
6+
### Fixes
7+
- [Return unknown GPU if device info is nil](https://github.com/EnumeratedDev/stormfetch/commit/8dfe7b3a0e0c1f95d34020b1f3fda5142f113671)
8+
- [Fix bash version checking](https://github.com/EnumeratedDev/stormfetch/commit/8147d302c8a8d170c6942378b4b74eac77d755ac)
9+
- [Fix multiple spaces when version number is empty](https://github.com/EnumeratedDev/stormfetch/commit/a919ffb71b78d706062030203029ef470b190e9c)

‎README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ At the moment ascii art for different distributions is limited. If you would lik
1111

1212
### Installation Guide
1313
#### Using a package manager
14-
- Arch Linux: You may use your favorite AUR manager to install the `stormfetch` package
14+
| Distribution | Package name |
15+
|:----------------------:|:------------------------------------------ |
16+
| Arch Linux/Artix Linux | `stormfetch` from the AUR |
17+
| Debian/Ubuntu | latest .deb file from the releases section |
18+
| Tide Linux | `stormfetch` from the main repository |
1519
#### Building from source
1620
- Download `go` from your package manager or from the go website
1721
- Download `make` from your package manager

‎debian/changelog‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
stormfetch (7.4-1) trixie; urgency=medium
2+
3+
* Fix version number
4+
* Update debian codename
5+
* Fix debhelper dependency
6+
7+
-- EnumDev <enumdev@enumerated.dev> Sat, 18 Apr 2026 14:18:37 +0300
8+
9+
stormfetch (7.4.3-1) stretch; urgency=medium
10+
11+
* Initial packaging work with dpkg-buildpackage.
12+
13+
-- EnumDev <enumdev@enumerated.dev> Fri, 17 Apr 2026 16:54:39 +0300

‎debian/compat‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9

‎debian/control‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Source: stormfetch
2+
Priority: optional
3+
Maintainer: EnumDev <enumdev@enumerated.dev>
4+
Build-Depends:
5+
debhelper (>= 9),
6+
libgl-dev,
7+
libx11-dev,
8+
libxcursor-dev,
9+
libxi-dev,
10+
libxinerama-dev,
11+
libxrandr-dev,
12+
libxxf86vm-dev
13+
Vcs-Git: https://github.com/EnumeratedDev/stormfetch.git
14+
Vcs-Browser: https://github.com/EnumeratedDev/stormfetch
15+
16+
Package: stormfetch
17+
Section: universe/utils
18+
Architecture: any
19+
Depends: bash
20+
Suggests: stormfetch-monitor-detection
21+
Description: A linux fetch program written in go
22+
23+
Package: stormfetch-monitor-detection
24+
Section: universe/utils
25+
Architecture: any
26+
Depends: stormfetch,libgl1,libx11-6,libxcursor1,libxi6,libxinerama1,libxrandr2,libxxf86vm1
27+
Description: Monitor detection utility for stormfetch

‎debian/rules‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/make -f
2+
3+
clean:
4+
-rm -r debian/stormfetch
5+
-rm -r debian/stormfetch-monitor-detection
6+
7+
build:
8+
# Build program
9+
make PREFIX=/usr SYSCONFDIR=/etc
10+
11+
binary:
12+
# Create directories
13+
mkdir -p debian/stormfetch
14+
mkdir -p debian/stormfetch-monitor-detection
15+
# Install program
16+
make DESTDIR=debian/stormfetch PREFIX=/usr SYSCONFDIR=/etc install-stormfetch
17+
make DESTDIR=debian/stormfetch PREFIX=/usr SYSCONFDIR=/etc install-config
18+
# Install monitor detection program
19+
make DESTDIR=debian/stormfetch-monitor-detection PREFIX=/usr SYSCONFDIR=/etc install-stormfetch-monitor-detection
20+
# Finalize packages
21+
dh_gencontrol
22+
dh_builddeb

0 commit comments

Comments
 (0)