myx/create_release.sh
2022-10-03 11:16:03 +03:00

34 lines
703 B
Bash
Executable File

#!/bin/bash
set -e
V=$(cat VERSION)
D=build
sed -i "s/CMake.*REQ/CMake $V REQ/" README.md
sed -i "s/VERSION \".*\"/VERSION \"$V\"/" MyxCMakeConfigVersion.cmake
mkdir -p "$D/myx-cmake-$V/MyxCMake"
cp -ap CMakeLists.txt "$D/myx-cmake-$V"
cp -ap *.cmake lib backports "$D/myx-cmake-$V/MyxCMake"
pushd "$D"
tar Jcf "myx-cmake_${V}.orig.tar.xz" "myx-cmake-$V"
popd
cp -ap debian "$D/myx-cmake-$V"
pushd "$D/myx-cmake-$V"
dch -D unstable -v "${V}-1" -m "New version."
dpkg-buildpackage -us -uc
popd
rm -rf "$D/myx-cmake-$V"
tar acf "$D/myx-cmake-$V.tar.xz" lib backports *.cmake
git commit -a
git tag $V
git push --tags
git tag -d $V
git push --all
tea r c -t $V --tag $V -a build/myx-cmake-$V.tar.xz