diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-06 01:45:46 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-06 01:45:46 +0100 |
commit | ec187ce677fdfd9114d82c63ee73c5ec60fac97a (patch) | |
tree | b5e3064724dd562be21773c26f063120d022cec5 /tools | |
parent | 524d7ed6723aefd78cc980ccae432959b10cc7b5 (diff) |
Updating the ruby artifact build script.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/build_artifact_ruby.sh | 37 |
1 files 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 - |