Fix passing web branch

pull/2868/head
Vasily 4 years ago
parent dbbf97e588
commit 99e22c499d

@ -81,7 +81,14 @@ if [[ $1 == '-b' || $1 == '--web-branch' ]]; then
web_branch="$2"
shift 2
else
web_branch="$( git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
web_branch="$( git describe --tags --exact-match || true )"
if [[ -z "$web_branch" ]]; then
web_branch="$( git branch 2>/dev/null | grep -v 'HEAD detached' | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
if [[ -z "${web_branch}" ]]; then
echo "Cannot determine web branch, pass it explicitly via --web-branch option"
exit 1
fi
fi
fi
# Parse platform option

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the RPMs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the RPMs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/rpm/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
ARCH="$( arch )"
@ -39,7 +39,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
ARCH="$( arch )"
@ -39,7 +39,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the RPMs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the RPMs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/rpm/* "${output_dir}"

@ -13,7 +13,7 @@ web_build_dir="$( mktemp -d )"
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
pushd ${web_build_dir}
git checkout tags/v10.5.3
git checkout "${web_branch}"
yarn install
mkdir -p ${web_target}
mv dist/* ${web_target}/

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/* "${output_dir}"

@ -13,7 +13,7 @@ web_build_dir="$( mktemp -d )"
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
pushd ${web_build_dir}
git checkout tags/v10.5.3
git checkout "${web_branch}"
yarn install
mkdir -p ${web_target}
mv dist/* ${web_target}/

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/* "${output_dir}"

@ -13,7 +13,7 @@ web_build_dir="$( mktemp -d )"
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
pushd ${web_build_dir}
git checkout tags/v10.5.3
git checkout "${web_branch}"
yarn install
mkdir -p ${web_target}
mv dist/* ${web_target}/

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
ARCH="$( arch )"
@ -39,7 +39,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
ARCH="$( arch )"
@ -39,7 +39,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/deb/* "${output_dir}"

@ -19,7 +19,7 @@ web_build_dir="$( mktemp -d )"
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
pushd ${web_build_dir}
git checkout tags/v10.5.3
git checkout "${web_branch}"
yarn install
mkdir -p ${web_target}
mv dist/* ${web_target}/

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/* "${output_dir}"

@ -19,7 +19,7 @@ web_build_dir="$( mktemp -d )"
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
pushd ${web_build_dir}
git checkout tags/v10.5.3
git checkout "${web_branch}"
yarn install
mkdir -p ${web_target}
mv dist/* ${web_target}/

@ -3,7 +3,7 @@
args="${@}"
declare -a docker_envvars
for arg in ${args}; do
docker_envvars+=("-e ${arg}")
docker_envvars+="-e ${arg} "
done
WORKDIR="$( pwd )"
@ -28,7 +28,7 @@ mkdir -p "${package_temporary_dir}"
# Set up the build environment Docker image
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
# Build the DEBs and copy out to ${package_temporary_dir}
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
${docker_sudo} docker run --rm ${docker_envvars} -v "${package_temporary_dir}:/dist" "${image_name}"
# Move the DEBs to the output directory
mkdir -p "${output_dir}"
mv "${package_temporary_dir}"/* "${output_dir}"

Loading…
Cancel
Save