mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Run bump_version in make srpm
Also add an "rpms" target that builds the RPMs using mock in a target environment. Fix BuildRequires: for RH platforms. Fixes: #3221 Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
This commit is contained in:
parent
31d02d804a
commit
b907d08b86
7 changed files with 81 additions and 33 deletions
27
bump_version
27
bump_version
|
@ -4,6 +4,7 @@
|
|||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
usage() {
|
||||
echo -e "bump_version - increase the shared version and generate changelogs"
|
||||
|
@ -22,8 +23,10 @@ package_file="./package*.json"
|
|||
|
||||
new_version="$1"
|
||||
|
||||
# Parse the version from build.yaml
|
||||
old_version="$( grep "version:" ${build_file} | sed -E 's/version: "([0-9\.]+[-a-z0-9]*)"/\1/' )"
|
||||
old_version="$(
|
||||
grep "version:" ${build_file} \
|
||||
| sed -E 's/version: "([0-9\.]+[-a-z0-9]*)"/\1/'
|
||||
)"
|
||||
echo "Old version: ${old_version}"
|
||||
|
||||
# Bump the NPM version
|
||||
|
@ -32,19 +35,22 @@ npm --no-git-tag-version --allow-same-version version v${new_version_sed}
|
|||
|
||||
# Set the build.yaml version to the specified new_version
|
||||
old_version_sed="$( sed 's/\./\\./g' <<<"${old_version}" )" # Escape the '.' chars
|
||||
sed -i "s/${old_version_sed}/${new_version}/g" ${build_file}
|
||||
sed -i "s/${old_version_sed}/${new_version_sed}/g" ${build_file}
|
||||
|
||||
|
||||
if [[ ${new_version} == *"-"* ]]; then
|
||||
new_version_deb="$( sed 's/-/~/g' <<<"${new_version}" )"
|
||||
new_version_pkg="$( sed 's/-/~/g' <<<"${new_version}" )"
|
||||
new_version_deb_sup=""
|
||||
else
|
||||
new_version_deb="${new_version}-1"
|
||||
new_version_pkg="${new_version}"
|
||||
new_version_deb_sup="-1"
|
||||
fi
|
||||
|
||||
# Write out a temporary Debian changelog with our new stuff appended and some templated formatting
|
||||
debian_changelog_file="debian/changelog"
|
||||
debian_changelog_temp="$( mktemp )"
|
||||
# Create new temp file with our changelog
|
||||
echo -e "jellyfin-web (${new_version_deb}) unstable; urgency=medium
|
||||
echo -e "jellyfin-web (${new_version_pkg}${new_version_deb_sup}) unstable; urgency=medium
|
||||
|
||||
* New upstream version ${new_version}; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v${new_version}
|
||||
|
||||
|
@ -65,8 +71,7 @@ pushd ${fedora_spec_temp_dir}
|
|||
# Split out the stuff before and after changelog
|
||||
csplit jellyfin-web.spec "/^%changelog/" # produces xx00 xx01
|
||||
# Update the version in xx00
|
||||
new_version_sed="$( sed 's/\./\\./g' <<<"${new_version}" )" # Escape the '.' chars
|
||||
sed -i "s/${old_version_sed}/${new_version_sed}/g" xx00
|
||||
sed -i "s/${old_version_sed}/${new_version_pkg}/g" xx00
|
||||
# Remove the header from xx01
|
||||
sed -i '/^%changelog/d' xx01
|
||||
# Create new temp file with our changelog
|
||||
|
@ -80,8 +85,8 @@ popd
|
|||
# Move into place
|
||||
mv ${fedora_spec_temp} ${fedora_spec_file}
|
||||
# Clean up
|
||||
rm -rf ${fedora_changelog_temp} ${fedora_spec_temp_dir}
|
||||
rm -rf ${fedora_spec_temp_dir}
|
||||
|
||||
# Stage the changed files for commit
|
||||
git add ${build_file} ${debian_changelog_file} ${fedora_spec_file} ${package_file}
|
||||
git status
|
||||
git add .
|
||||
git status -v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue