2020-03-23 21:06:35 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o xtrace
|
|
|
|
|
2020-06-12 08:18:20 -07:00
|
|
|
# move to source directory
|
2020-03-23 21:06:35 -07:00
|
|
|
pushd ${SOURCE_DIR}
|
|
|
|
|
2020-06-12 08:18:20 -07:00
|
|
|
# get version
|
2020-06-12 14:20:01 -07:00
|
|
|
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
2020-06-12 13:05:05 -07:00
|
|
|
version="${BUILD_ID}"
|
|
|
|
else
|
|
|
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
|
|
|
fi
|
2020-03-23 21:06:35 -07:00
|
|
|
|
2020-06-12 08:18:20 -07:00
|
|
|
# build archives
|
2021-04-08 14:09:52 -07:00
|
|
|
npm ci --no-audit --unsafe-perm
|
2023-03-10 10:24:43 -07:00
|
|
|
npm run build:production
|
2020-06-19 23:17:11 -07:00
|
|
|
mv dist jellyfin-web_${version}
|
|
|
|
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
|
2020-06-12 08:18:20 -07:00
|
|
|
rm -rf dist
|
2020-03-23 21:06:35 -07:00
|
|
|
|
2020-06-12 08:18:20 -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
|
2020-06-15 03:54:00 -07:00
|
|
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
2020-03-23 21:06:35 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|