Skip to content

Commit 9aebc38

Browse files
committed
Bump version: 0.3.0 → 0.3.1
1 parent b792636 commit 9aebc38

10 files changed

Lines changed: 44 additions & 30 deletions

File tree

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.0
2+
current_version = 0.3.1
33

44
[bumpversion:file:Cargo.toml]
55
search = version = "{current_version}"

.github/workflows/linux-publish.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,29 @@ name: Debian/RPM Packaging Release
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
78

89
jobs:
910
build-debian:
1011
name: Build Debian Package
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v4
14-
1515
- name: Install dependencies
1616
run: |
1717
sudo apt-get update
1818
sudo apt-get install -y build-essential debhelper dh-cargo devscripts pkg-config libssl-dev
1919
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
toolchain: stable
24+
2025
- name: Build Debian package
2126
run: |
22-
debuild -us -uc -b
27+
debuild --preserve-envvar PATH -us -uc -b
2328
mkdir -p dist
2429
mv ../*.deb ./dist/
2530
@@ -34,30 +39,39 @@ jobs:
3439
runs-on: ubuntu-latest
3540
steps:
3641
- uses: actions/checkout@v4
37-
3842
- name: Install dependencies
3943
run: |
4044
sudo apt-get update
41-
sudo apt-get install -y rpm cargo rustc pkg-config libssl-dev
45+
sudo apt-get install -y rpm pkg-config libssl-dev
46+
sudo apt-get install -y rpm
4247
43-
- name: Install rpmdevtools
44-
run: sudo apt-get install -y rpm
48+
- name: Install Rust
49+
uses: dtolnay/rust-toolchain@stable
50+
with:
51+
toolchain: stable
4552

4653
- name: Prepare RPM build environment
4754
run: |
4855
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
4956
cp rpm/ddg-rs.spec ~/rpmbuild/SPECS/
5057
51-
# Extract version from GitHub ref
52-
VERSION=${GITHUB_REF#refs/tags/v}
53-
sed -i "s/Version:.*$/Version: $VERSION/" ~/rpmbuild/SPECS/ddg-rs.spec
58+
if [[ $GITHUB_REF == refs/tags/v* ]]; then
59+
VERSION=${GITHUB_REF#refs/tags/v}
60+
else
61+
VERSION=$(grep -m 1 "^version =" Cargo.toml | cut -d '"' -f 2)-${GITHUB_SHA::8}
62+
fi
63+
64+
VERSION_CLEAN=$(echo $VERSION | sed 's|/|-|g')
65+
66+
sed -i "s\|Version:.*$|Version: ${VERSION_CLEAN%%-*}|" ~/rpmbuild/SPECS/ddg-rs.spec
67+
68+
tar -czvf ~/rpmbuild/SOURCES/ddg-rs-${VERSION_CLEAN}.tar.gz --transform "s,^\.,ddg-rs-${VERSION_CLEAN}," --exclude=.git .
5469
55-
# Archive sources
56-
tar -czvf ~/rpmbuild/SOURCES/ddg-rs-${VERSION}.tar.gz .
70+
echo "VERSION_CLEAN=$VERSION_CLEAN" >> $GITHUB_ENV
5771
5872
- name: Build RPM package
5973
run: |
60-
rpmbuild -bb ~/rpmbuild/SPECS/ddg-rs.spec
74+
rpmbuild -bb --nodeps ~/rpmbuild/SPECS/ddg-rs.spec
6175
mkdir -p dist
6276
mv ~/rpmbuild/RPMS/*/*.rpm ./dist/
6377
@@ -69,6 +83,7 @@ jobs:
6983

7084
release:
7185
name: Publish Linux Packages Release
86+
if: startsWith(github.ref, 'refs/tags/v')
7287
needs: [build-debian, build-rpm]
7388
runs-on: ubuntu-latest
7489
permissions:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "duckduckgo"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
authors = ["Mahmoud Harmouch <oss@wiseai.dev>"]
55
edition = "2024"
66
description = "🦆 A CLI, TUI, and SDK for instant DuckDuckGo searches."

PACKAGING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The `debian/` directory handles building `.deb` packages using standard `debhelp
1919
```
2020
1. Install the generated package:
2121
```sh
22-
sudo dpkg -i ../ddg-rs_0.3.0-1_amd64.deb
22+
sudo dpkg -i ../ddg-rs_0.3.1-1_amd64.deb
2323
```
2424

2525
## RedHat/Fedora (.rpm)
@@ -39,13 +39,13 @@ The `rpm/` directory manages `.rpm` package configurations through the `ddg-rs.s
3939
```
4040
1. Archive the module and place it into the `SOURCES` directory:
4141
```sh
42-
tar -czvf ~/rpmbuild/SOURCES/ddg-rs-0.3.0.tar.gz .
42+
tar -czvf ~/rpmbuild/SOURCES/ddg-rs-0.3.1.tar.gz .
4343
```
4444
1. Build the RPM:
4545
```sh
46-
rpmbuild -bb ~/rpmbuild/SPECS/ddg-rs.spec
46+
rpmbuild -bb --nodeps rpm/ddg-rs.spec
4747
```
4848
1. Install the built RPM:
4949
```sh
50-
sudo dnf install ~/rpmbuild/RPMS/x86_64/ddg-rs-0.3.0-1.x86_64.rpm
50+
sudo dnf install ~/rpmbuild/RPMS/x86_64/ddg-rs-0.3.1-1.x86_64.rpm
5151
```

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ddg-rs (0.3.0-1) unstable; urgency=medium
1+
ddg-rs (0.3.1-1) unstable; urgency=medium
22

33
* Initial release.
44

debian/compat

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ddg-rs",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"bin": {

python/ddg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from ._ddg import * # noqa: F401, F403
22

3-
__version__ = "0.3.0"
3+
__version__ = "0.3.1"

rpm/ddg-rs.spec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
%global debug_package %{nil}
22

3-
Name: duckduckgo
3+
Name: ddg-rs
44
Version: 0.3.0
55
Release: 1%{?dist}
66
Summary: A CLI, TUI, and SDK for instant DuckDuckGo searches
77
License: MIT
8-
URL: https://github.com/wiseaidotdev/%{name}
8+
URL: https://github.com/wiseaidotdev/duckduckgo
99
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
1010

1111
BuildRequires: cargo
@@ -15,13 +15,13 @@ BuildRequires: openssl-devel
1515
Requires: openssl
1616

1717
%description
18-
Duckduckgo is a multi-language toolkit for searching DuckDuckGo from
18+
ddg-rs is a multi-language toolkit for searching DuckDuckGo from
1919
code or the command line. The core is written entirely in Rust and
2020
compiled to a native extension. Features include Instant Answer, Lite, Images,
2121
and News backends, along with a standalone CLI and TUI.
2222

2323
%prep
24-
%autosetup -n %{name}-%{version}
24+
%autosetup -n ddg-rs-%{version}
2525

2626
%build
2727
export RUSTFLAGS="%{build_rustflags} -C strip=symbols"
@@ -37,5 +37,5 @@ install -Dpm 0644 README.md -t %{buildroot}%{_docdir}/%{name}/
3737
%{_bindir}/ddg
3838

3939
%changelog
40-
* Mon Apr 20 2026 Mahmoud Harmouch <oss@wiseai.dev> - 0.3.0-1
40+
* Mon Apr 20 2026 Mahmoud Harmouch <oss@wiseai.dev> - 0.3.1-1
4141
- Initial release

0 commit comments

Comments
 (0)