15 lines
501 B
Bash
15 lines
501 B
Bash
|
#!/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}"
|
||
|
|
||
|
# TODO: Support multiple Alpine/Ruby versions
|
||
|
gem fetch --source=https://gems.${SUTTY} --platform=ruby --version ${VERSION} ${GEM}
|
||
|
gem compile -V --prune --strip "strip --strip-unneeded" "${GEM}-${VERSION}.gem"
|
||
|
gem inabox -o "${GEM}-${VERSION}-${PLATFORM}.gem" --host https://${HTTP_BASIC_USER}:${HTTP_BASIC_PASSWORD}@gems.${SUTTY}
|