From ec187ce677fdfd9114d82c63ee73c5ec60fac97a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org> Date: Sat, 6 Feb 2016 01:45:46 +0100 Subject: [PATCH] Updating the ruby artifact build script. --- tools/run_tests/build_artifact_ruby.sh | 37 ++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 482d128be3..8033c3157a 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -27,16 +27,43 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - set -ex - cd $(dirname $0)/../.. +set +ex +[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh +set -ex + +SYSTEM=`uname | cut -f 1 -d_` +if [ "$SYSTEM" == "MSYS" ] ; then + SYSTEM=MINGW32 +fi +if [ "$SYSTEM" == "MINGW64" ] ; then + SYSTEM=MINGW32 +fi -${SETARCH_CMD} bundle install +if [ "$SYSTEM" == "MINGW32" ] ; then + echo "Need Linux to build the Windows ruby gem." + exit 1 +fi -${SETARCH_CMD} rake native gem +if [ "$SYSTEM" == "Darwin" ] ; then + set +ex + rvm use ruby-head + set -ex +fi + +if [ "$SYSTEM" == "Linux" ] ; then + set +ex + ${SETARCH_CMD} bundle install + set -ex +fi + +${SETARCH_CMD} rake gem:native + +if [ "$SYSTEM" == "Darwin" ] ; then + rm pkg/`ls pkg/*.gem | grep -v darwin` +fi mkdir -p artifacts cp pkg/*.gem artifacts - -- GitLab