Skip to content

Commit

Permalink
shell lint fixes and trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
felixsch committed Feb 6, 2024
1 parent 212be22 commit 5e99a47
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# those are: SLE15 (2.5.8, 2.5.9)
ruby-version: ['2.5.8', '2.5.9']
# skipping Ruby3 tests for now, because RMT isn't Ruby3 compatible yet, and the failing
# tests confuse the team.
# tests confuse the team.
# ruby-version: ['2.5.8', '2.5.9', '3.0.3']

services:
Expand Down
18 changes: 9 additions & 9 deletions ci/rmt-build-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ ARTIFACT_DIR=${ARTIFACT_DIR:-$SOURCE/tmp/artifacts}
# Current version we are working with
VERSION=$(ruby -r "$SOURCE/lib/rmt" -e 'print RMT::VERSION')

group() { echo "::group::$@"; }
group() { echo "::group::$1"; }
groupend() { echo "::groupend::"; }
fail() { echo "::error::$@"; exit 1;}
fail() { echo "::error::$1"; exit 1;}

# Setup artifact dir
mkdir -p $ARTIFACT_DIR
mkdir -p "$ARTIFACT_DIR"

group "create rmt-server tarball"
pushd $SOURCE
pushd "$SOURCE"
make dist
cp $SOURCE/package/obs/rmt-server-$VERSION.tar.bz2 $ARTIFACT_DIR
cp "$SOURCE/package/obs/rmt-server-$VERSION.tar.bz2" "$ARTIFACT_DIR"
popd
groupend

group "prepare build environment (in $BUILD_DIR)"
pushd $BUILD_DIR
pushd "$BUILD_DIR"
mkdir -p {BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS,OTHERS}
cp -r $SOURCE/package/obs/* SOURCES/
cp -r "$SOURCE/package/obs/*" SOURCES/
popd
groupend

group "build rmt-server-$VERSION.x86_64.rpm"
pushd $BUILD_DIR
rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --undefine _enable_debug_packages SOURCES/rmt-server.spec
cp -r RPMS/x86_64/rmt-server-$VERSION*.rpm $ARTIFACT_DIR/
cp -r RPMS/x86_64/rmt-server-config-$VERSION*.rpm $ARTIFACT_DIR/
cp -r "RPMS/x86_64/rmt-server-$VERSION*.rpm" "$ARTIFACT_DIR/"
cp -r "RPMS/x86_64/rmt-server-config-$VERSION*.rpm" "$ARTIFACT_DIR/"
popd
groupend
8 changes: 4 additions & 4 deletions ci/rmt-configure
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ group() { echo "::group::$@"; }
groupend() { echo "::groupend::"; }
fail() { echo "::error::$@"; exit 1; }

if [ "x$SCC_PASSWORD" = "x" ] || [ "x$SCC_USERNAME" = "x" ]; then
if [ "$SCC_PASSWORD" = "" ] || [ "$SCC_USERNAME" = "" ]; then
fail "To correctly configure RMT environment variables \$SCC_USERNAME and \$SCC_PASSWORD are required. Check your environment!"
fi

Expand All @@ -45,8 +45,8 @@ group "setup system uuid"
groupend

group "install rmt-server rpms"
pushd $BUILD_DIR/RPMS/x86_64
zypper --non-interactive --no-refresh install --allow-unsigned-rpm $RPMS
pushd "$BUILD_DIR/RPMS/x86_64"
zypper --non-interactive --no-refresh install --allow-unsigned-rpm "$RPMS"
popd
groupend

Expand All @@ -71,7 +71,7 @@ EOL
groupend

group "setup database"
pushd $INSTALL_DIR
pushd "$INSTALL_DIR"
RAILS_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rails db:drop db:create db:migrate
popd
groupend
Expand Down
4 changes: 2 additions & 2 deletions ci/rmt-run-feature-tests
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ set -e
# Where is the rmt-server source code located
SOURCE=${SOURCE:-/usr/src/rmt-server}

group() { echo "::group::$@"; }
group() { echo "::group::$1"; }
groupend() { echo "::groupend::"; }

group "synchronize SCC product/repositories"
rmt-cli sync
groupend

group "run feature tests"
pushd $SOURCE
pushd "$SOURCE"
NO_COVERAGE=true bundle exec rspec features/
popd
groupend

0 comments on commit 5e99a47

Please sign in to comment.