Skip to content

Commit

Permalink
Restyle release: added ability to do dry runs of releases (#1102)
Browse files Browse the repository at this point in the history
* Restyled by shfmt

* Restyled by whitespace

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
restyled-io[bot] and restyled-commits authored Dec 6, 2023
1 parent 2aa8ce0 commit d23d9f3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
56 changes: 28 additions & 28 deletions e2e/assert.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
#!/usr/bin/env bash

assert() {
local actual
actual="$(bash -c "$1")"
if [[ "$actual" != "$2" ]]; then
echo "Expected '$2' but got '$actual'"
exit 1
fi
local actual
actual="$(bash -c "$1")"
if [[ "$actual" != "$2" ]]; then
echo "Expected '$2' but got '$actual'"
exit 1
fi
}

assert_contains() {
local actual
actual="$(bash -c "$1")"
if [[ "$actual" != *"$2"* ]]; then
echo "Expected '$2' to be in '$actual'"
exit 1
fi
local actual
actual="$(bash -c "$1")"
if [[ "$actual" != *"$2"* ]]; then
echo "Expected '$2' to be in '$actual'"
exit 1
fi
}

assert_not_contains() {
local actual
actual="$(bash -c "$1")"
if [[ "$actual" == *"$2"* ]]; then
echo "Expected '$2' to not be in '$actual'"
exit 1
fi
local actual
actual="$(bash -c "$1")"
if [[ "$actual" == *"$2"* ]]; then
echo "Expected '$2' to not be in '$actual'"
exit 1
fi
}

assert_fail() {
if bash -c "$1" 2>&1; then
echo "Expected failure but succeeded"
exit 1
fi
if bash -c "$1" 2>&1; then
echo "Expected failure but succeeded"
exit 1
fi
}

assert_matches() {
local actual
actual="$(bash -c "$1")"
if [[ ! "$actual" =~ $2 ]]; then
echo "Expected '$2' to match '$actual'"
exit 1
fi
local actual
actual="$(bash -c "$1")"
if [[ ! "$actual" =~ $2 ]]; then
echo "Expected '$2' to match '$actual'"
exit 1
fi
}
1 change: 0 additions & 1 deletion packaging/rpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ RUN dnf install -y rpm-build rpm-sign ruby ruby-devel gcc \
&& gem install fpm \
&& dnf install -y createrepo \
&& dnf clean all

0 comments on commit d23d9f3

Please sign in to comment.