Skip to content

Commit

Permalink
atuin: 17.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Oct 26, 2023
1 parent 0bef2a5 commit 8657894
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
17 changes: 17 additions & 0 deletions build-res/atuin-run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# this helper script is needed because it seems like it's not possible
# to run a background process in the .spec file directly

set -e

source ~/.cargo/env

# PostgresQL is needed for some tests
PGDATA="$HOME/.local/share/pgsql/data"
mkdir -p "$PGDATA"
postgres -D "$PGDATA" &> postgres.log &
ss -tupln

cargo test --workspace
cat postgres.log
29 changes: 18 additions & 11 deletions specs/atuin.spec
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
%global debug_package %{nil}

Name: atuin
Version: 16.0.0
Version: 17.0.0
Release: 1%{?dist}
Summary: Magical shell history

License: MIT
URL: https://github.com/ellie/atuin
Source0: %{url}/archive/v%{version}.tar.gz
Source1: build-res/atuin-run-tests.sh

BuildRequires: gcc
BuildRequires: gcc iproute postgresql-server

%description
Atuin replaces your existing shell history with a SQLite database, and
Expand All @@ -24,18 +25,20 @@ machines, via an Atuin server.
curl -Lf "https://sh.rustup.rs" | sh -s -- --profile minimal -y

%build
source ~/.cargo/env
RUSTFLAGS="-C strip=symbols" cargo build --release

for SHELL in "bash" "fish" "zsh"; do
target/release/%{name} gen-completions --shell $SHELL -o .
done
ls -l
./atuin-run-tests.sh

%check
source ~/.cargo/env
# skip postgres test
cargo test --workspace -- \
--skip registration

# PostgresQL is needed for some tests
PGDATA="$HOME/.local/share/pgsql/data"
mkdir -p "$PGDATA"
postgres -D "$PGDATA" &> postgres.log &
ss -tupln

cargo test --workspace
cat postgres.log

%install
# bin
Expand All @@ -55,6 +58,10 @@ install -Dpm 644 _%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
%{_datadir}/zsh/site-functions/_%{name}

%changelog
* Thu Oct 26 2023 cyqsimon - 17.0.0-1
- Release 17.0.0
- Re-enable postgresql tests

* Tue Aug 08 2023 cyqsimon - 16.0.0-1
- Relaese 16.0.0

Expand Down

0 comments on commit 8657894

Please sign in to comment.