File: test-gem-build

package info (click to toggle)
ruby-nokogiri 1.18.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,076 kB
  • sloc: ansic: 38,893; xml: 27,665; ruby: 27,285; java: 15,348; cpp: 7,107; yacc: 244; sh: 208; makefile: 154; sed: 14
file content (42 lines) | stat: -rwxr-xr-x 974 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /usr/bin/env bash
#
#  run as part of CI, see gem-install.yml
#
if [[ $# -lt 2 ]] ; then
  echo "usage: $(basename $0) <output_dir> <platform>"
  exit 1
fi

set -e

OUTPUT_DIR=$1
BUILD_NATIVE_GEM=$2

test -e /etc/os-release && cat /etc/os-release

set -u -x

# avoid the pernicious "fatal: detected dubious ownership in repository" errors
git config --global --add safe.directory $(realpath $(dirname $0)/..)

bundle

bundle exec rake set-version-to-timestamp

if [[ "${BUILD_NATIVE_GEM}" == "ruby" ]] ; then
  # TODO we're only compiling so that we retrieve libxml2/libxslt tarballs, we can do better.
  bundle exec rake clean compile
  bundle exec rake gem
elif [[ "${BUILD_NATIVE_GEM}" == "java" ]] ; then
  bundle exec rake java gem
else
  bundle exec rake gem:${BUILD_NATIVE_GEM}:builder
fi

chmod -v 664 ports/archives/* || true

./scripts/test-gem-file-contents pkg/nokogiri*.gem

mkdir -p ${OUTPUT_DIR}
cp -v pkg/nokogiri*.gem ${OUTPUT_DIR}
ls -l ${OUTPUT_DIR}/*