Sha256: 927cef5ccabc3d5843ab0a681fe36e0b58b65bd8ac97ec98a9320b15b5e2dbdb

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

#!/bin/bash -x
set -ex

ctr=$(buildah from registry.fedoraproject.org/fedora:31)

rpms=(
  make gcc ruby ruby-devel redhat-rpm-config # for building gems
  gcc-c++                                    # for building unf_ext
  libvirt-devel                              # for building ruby-libvirt gem
  zlib-devel                                 # for building nokogiri gem
  git                                        # for the git ls-files in gemspec file
  bsdtar                                     # used by vagrant to unpack box files
)

WORKINGDIR='/tmp/workingdir/'

# Set working directory
buildah config --workingdir $WORKINGDIR $ctr

# Get all updates and install needed rpms
buildah run $ctr -- dnf update -y
buildah run $ctr -- dnf install -y ${rpms[@]}

# Add source code
buildah add $ctr './' $WORKINGDIR

# Install bundler
buildah run $ctr -- gem install bundler

# Install all needed gems
buildah run $ctr -- bundle install --with plugins

# Install all needed gems
buildah run $ctr -- bundle exec rake build

# Copy built files outside of container
mount=$(buildah mount $ctr)
package=$(ls $mount/$WORKINGDIR/pkg/vagrant-sshfs-*gem)
echo "copying to ./$(basename $package)"
cp $package ./
buildah umount $ctr

echo "Built package is at ./$(basename $package)"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-sshfs-1.3.5 build.sh
vagrant-sshfs-1.3.4 build.sh
vagrant-sshfs-1.3.3 build.sh
vagrant-sshfs-1.3.2 build.sh