jellyfin-web/deployment/build.portable

27 lines
535 B
Plaintext
Raw Normal View History

2020-03-23 21:06:35 -07:00
#!/bin/bash
set -o errexit
set -o xtrace
# move to source directory
2020-03-23 21:06:35 -07:00
pushd ${SOURCE_DIR}
# get version
2020-03-23 21:06:35 -07:00
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
# build archives
2020-03-23 21:06:35 -07:00
npx yarn install
mv dist jellyfin-web-${version}
tar -czf jellyfin-web-${version}-portable.tar.gz jellyfin-web-${version}
rm -rf dist
2020-03-23 21:06:35 -07:00
# move the artifacts
mkdir -p ${ARTIFACT_DIR}
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}
2020-03-23 21:06:35 -07:00
if [[ ${IS_DOCKER} == YES ]]; then
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
2020-03-23 21:06:35 -07:00
fi
popd