|
|
@ -15,6 +15,7 @@ prompt() {
|
|
|
|
cleanup() {
|
|
|
|
cleanup() {
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
echo Removing old build directory
|
|
|
|
echo Removing old build directory
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d ./build ]; then
|
|
|
|
if [ -d ./build ]; then
|
|
|
|
rm -rf ./build
|
|
|
|
rm -rf ./build
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -23,12 +24,14 @@ cleanup() {
|
|
|
|
update() {
|
|
|
|
update() {
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
echo Updating version to ${NEWVERSION}
|
|
|
|
echo Updating version to ${NEWVERSION}
|
|
|
|
|
|
|
|
|
|
|
|
sed -i "s#\"${PYVERSION}\"#\"${NEWVERSION}\"#" "gallery_dl/version.py"
|
|
|
|
sed -i "s#\"${PYVERSION}\"#\"${NEWVERSION}\"#" "gallery_dl/version.py"
|
|
|
|
sed -i "s#v${OLDVERSION}#v${NEWVERSION}#" "${README}"
|
|
|
|
sed -i "s#v${OLDVERSION}#v${NEWVERSION}#" "${README}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
update-dev() {
|
|
|
|
update-dev() {
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
|
|
|
|
|
|
|
|
IFS="." read MAJOR MINOR BUILD <<< "${NEWVERSION}"
|
|
|
|
IFS="." read MAJOR MINOR BUILD <<< "${NEWVERSION}"
|
|
|
|
BUILD=$((BUILD+1))
|
|
|
|
BUILD=$((BUILD+1))
|
|
|
|
# update version to -dev
|
|
|
|
# update version to -dev
|
|
|
@ -41,15 +44,16 @@ update-dev() {
|
|
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
build() {
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
|
|
|
|
|
|
|
|
# build wheel and source distributions
|
|
|
|
|
|
|
|
echo Building bdist_wheel and sdist
|
|
|
|
echo Building bdist_wheel and sdist
|
|
|
|
|
|
|
|
|
|
|
|
python setup.py bdist_wheel sdist
|
|
|
|
python setup.py bdist_wheel sdist
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
build_windows() {
|
|
|
|
build-windows() {
|
|
|
|
# build windows exe in vm
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
echo Building Windows executable
|
|
|
|
echo Building Windows executable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build windows exe in vm
|
|
|
|
ln -fs "${ROOTDIR}" /tmp/
|
|
|
|
ln -fs "${ROOTDIR}" /tmp/
|
|
|
|
vmstart "Windows 7" &
|
|
|
|
vmstart "Windows 7" &
|
|
|
|
disown
|
|
|
|
disown
|
|
|
@ -72,6 +76,7 @@ build_windows() {
|
|
|
|
sign() {
|
|
|
|
sign() {
|
|
|
|
cd "${ROOTDIR}/dist"
|
|
|
|
cd "${ROOTDIR}/dist"
|
|
|
|
echo Signing files
|
|
|
|
echo Signing files
|
|
|
|
|
|
|
|
|
|
|
|
gpg --detach-sign --armor gallery_dl-${NEWVERSION}-py3-none-any.whl
|
|
|
|
gpg --detach-sign --armor gallery_dl-${NEWVERSION}-py3-none-any.whl
|
|
|
|
gpg --detach-sign --armor gallery_dl-${NEWVERSION}.tar.gz
|
|
|
|
gpg --detach-sign --armor gallery_dl-${NEWVERSION}.tar.gz
|
|
|
|
gpg --detach-sign gallery-dl.exe
|
|
|
|
gpg --detach-sign gallery-dl.exe
|
|
|
@ -89,9 +94,21 @@ changelog() {
|
|
|
|
"${CHANGELOG}"
|
|
|
|
"${CHANGELOG}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
supportedsites() {
|
|
|
|
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
|
|
|
|
echo Checking if "${SUPPORTEDSITES}" is up to date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
./scripts/build_supportedsites.py
|
|
|
|
|
|
|
|
if ! git diff --quiet "${SUPPORTEDSITES}"; then
|
|
|
|
|
|
|
|
echo "updated ${SUPPORTEDSITES} contains changes"
|
|
|
|
|
|
|
|
exit 4
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
git-upload() {
|
|
|
|
git-upload() {
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
cd "${ROOTDIR}"
|
|
|
|
echo Pushing changes to github
|
|
|
|
echo Pushing changes to github
|
|
|
|
|
|
|
|
|
|
|
|
git add "gallery_dl/version.py" "${README}" "${CHANGELOG}"
|
|
|
|
git add "gallery_dl/version.py" "${README}" "${CHANGELOG}"
|
|
|
|
git commit -S -m "release version ${NEWVERSION}"
|
|
|
|
git commit -S -m "release version ${NEWVERSION}"
|
|
|
|
git tag -s -m "version ${NEWVERSION}" "v${NEWVERSION}"
|
|
|
|
git tag -s -m "version ${NEWVERSION}" "v${NEWVERSION}"
|
|
|
@ -102,6 +119,7 @@ git-upload() {
|
|
|
|
pypi-upload() {
|
|
|
|
pypi-upload() {
|
|
|
|
cd "${ROOTDIR}/dist"
|
|
|
|
cd "${ROOTDIR}/dist"
|
|
|
|
echo Uploading to PyPI
|
|
|
|
echo Uploading to PyPI
|
|
|
|
|
|
|
|
|
|
|
|
twine upload gallery_dl-${NEWVERSION}*
|
|
|
|
twine upload gallery_dl-${NEWVERSION}*
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -109,6 +127,7 @@ pypi-upload() {
|
|
|
|
ROOTDIR="$(realpath "$(dirname "$0")/..")/"
|
|
|
|
ROOTDIR="$(realpath "$(dirname "$0")/..")/"
|
|
|
|
README="README.rst"
|
|
|
|
README="README.rst"
|
|
|
|
CHANGELOG="CHANGELOG.md"
|
|
|
|
CHANGELOG="CHANGELOG.md"
|
|
|
|
|
|
|
|
SUPPORTEDSITES="./docs/supportedsites.rst"
|
|
|
|
|
|
|
|
|
|
|
|
LASTTAG="$(git describe --abbrev=0 --tags)"
|
|
|
|
LASTTAG="$(git describe --abbrev=0 --tags)"
|
|
|
|
OLDVERSION="${LASTTAG#v}"
|
|
|
|
OLDVERSION="${LASTTAG#v}"
|
|
|
@ -127,10 +146,11 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prompt
|
|
|
|
prompt
|
|
|
|
|
|
|
|
supportedsites
|
|
|
|
cleanup
|
|
|
|
cleanup
|
|
|
|
update
|
|
|
|
update
|
|
|
|
build
|
|
|
|
build
|
|
|
|
build_windows
|
|
|
|
build-windows
|
|
|
|
sign
|
|
|
|
sign
|
|
|
|
changelog
|
|
|
|
changelog
|
|
|
|
git-upload
|
|
|
|
git-upload
|
|
|
|