2021-09-29 19:19:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
test -n "${GEM_NAME}"
|
|
|
|
test -n "${GEM_VERSION}"
|
|
|
|
test -n "${HTTP_BASIC_USER}"
|
|
|
|
test -n "${HTTP_BASIC_PASSWORD}"
|
|
|
|
test -n "${SUTTY}"
|
|
|
|
test -n "${PLATFORM}"
|
|
|
|
|
2022-08-26 19:21:32 +00:00
|
|
|
source /etc/os-release
|
|
|
|
|
|
|
|
# 3.13.alpine.gems.sutty.nl
|
|
|
|
# rolling.arch.gems.sutty.nl
|
|
|
|
# 18.04.ubuntu.gems.sutty.nl
|
|
|
|
OS_VERSION="$(os-version)"
|
|
|
|
RUBY_GEMS="${OS_VERSION}.${ID}.gems.${SUTTY}"
|
|
|
|
|
2021-09-30 00:11:17 +00:00
|
|
|
cd cache/
|
2023-02-04 16:02:45 +00:00
|
|
|
gem fetch --source=https://rubygems.org --platform=ruby --version ${GEM_VERSION} ${GEM_NAME}
|
2021-09-30 00:11:17 +00:00
|
|
|
|
|
|
|
cd ../gems/
|
2021-10-01 13:35:21 +00:00
|
|
|
gem compile -V --prune --strip "strip --strip-unneeded" ${GEM_COMPILER_FLAGS} "../cache/${GEM_NAME}-${GEM_VERSION}.gem"
|
2022-08-26 19:21:32 +00:00
|
|
|
gem inabox -o "${GEM_NAME}-${GEM_VERSION}-${PLATFORM}.gem" --host https://${HTTP_BASIC_USER}:${HTTP_BASIC_PASSWORD}@${RUBY_GEMS}
|