mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
a8143b61b1
Signed-off-by: d9pouces <github@19pouces.net>
33 lines
1013 B
Bash
33 lines
1013 B
Bash
#!/bin/sh
|
|
# Build a minimal, hand-rolled RubyGems package and a full gem repository
|
|
# index for it (legacy + compact index formats), for integration-testing
|
|
# the `ruby` module of id-configurator. Uses RubyGems' own `gem build` and
|
|
# `gem generate_index` (the same tools a real gem server host would use)
|
|
# rather than hand-rolling the compact index's binary/marshal formats.
|
|
set -eu
|
|
|
|
PACKAGE=idconfiguratortestpkg
|
|
VERSION=0.0.1
|
|
MARKER="test-only gem served by the id-configurator integration tests"
|
|
|
|
gem install rubygems-generate_index --no-document
|
|
|
|
mkdir -p "/build/${PACKAGE}-${VERSION}"
|
|
cd "/build/${PACKAGE}-${VERSION}"
|
|
cat > "${PACKAGE}.gemspec" <<EOF
|
|
Gem::Specification.new do |s|
|
|
s.name = "${PACKAGE}"
|
|
s.version = "${VERSION}"
|
|
s.summary = "test-only gem"
|
|
s.authors = ["InterDiode"]
|
|
s.license = "MIT"
|
|
s.files = ["marker.txt"]
|
|
end
|
|
EOF
|
|
echo "${MARKER}" > marker.txt
|
|
gem build "${PACKAGE}.gemspec"
|
|
|
|
mkdir -p /srv/gems
|
|
cp ./*.gem /srv/gems/
|
|
gem generate_index -d /srv
|