projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tenplay] Add new extractor
[youtube-dl]
/
devscripts
/
release.sh
diff --git
a/devscripts/release.sh
b/devscripts/release.sh
index 796468b4b3aee3e603ddb919535bfde281cd71e5..2974a7c3eee0e14c0f8c2f03b41ce899eeda9324 100755
(executable)
--- a/
devscripts/release.sh
+++ b/
devscripts/release.sh
@@
-14,16
+14,24
@@
set -e
set -e
-skip_tests=
fals
e
-if [ "$1" = '--
skip-test
' ]; then
- skip_tests=
tru
e
+skip_tests=
tru
e
+if [ "$1" = '--
run-tests
' ]; then
+ skip_tests=
fals
e
shift
fi
if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi
version="$1"
shift
fi
if [ -z "$1" ]; then echo "ERROR: specify version number like this: $0 1994.09.06"; exit 1; fi
version="$1"
+major_version=$(echo "$version" | sed -n 's#^\([0-9]*\.[0-9]*\.[0-9]*\).*#\1#p')
+if test "$major_version" '!=' "$(date '+%Y.%m.%d')"; then
+ echo "$version does not start with today's date!"
+ exit 1
+fi
+
if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi
if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi
if [ ! -z "`git tag | grep "$version"`" ]; then echo 'ERROR: version already present'; exit 1; fi
if [ ! -z "`git status --porcelain | grep -v CHANGELOG`" ]; then echo 'ERROR: the working directory is not clean; commit or stash changes'; exit 1; fi
+useless_files=$(find youtube_dl -type f -not -name '*.py')
+if [ ! -z "$useless_files" ]; then echo "ERROR: Non-.py files in youtube_dl: $useless_files"; exit 1; fi
if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit 1; fi
/bin/echo -e "\n### First of all, testing..."
if [ ! -f "updates_key.pem" ]; then echo 'ERROR: updates_key.pem missing'; exit 1; fi
/bin/echo -e "\n### First of all, testing..."
@@
-68,7
+76,7
@@
RELEASE_FILES="youtube-dl youtube-dl.exe youtube-dl-$version.tar.gz"
git checkout HEAD -- youtube-dl youtube-dl.exe
/bin/echo -e "\n### Signing and uploading the new binaries to yt-dl.org ..."
git checkout HEAD -- youtube-dl youtube-dl.exe
/bin/echo -e "\n### Signing and uploading the new binaries to yt-dl.org ..."
-for f in $RELEASE_FILES; do gpg --detach-sig "build/$version/$f"; done
+for f in $RELEASE_FILES; do gpg --
passphrase-repeat 5 --
detach-sig "build/$version/$f"; done
scp -r "build/$version" ytdl@yt-dl.org:html/tmp/
ssh ytdl@yt-dl.org "mv html/tmp/$version html/downloads/"
ssh ytdl@yt-dl.org "sh html/update_latest.sh $version"
scp -r "build/$version" ytdl@yt-dl.org:html/tmp/
ssh ytdl@yt-dl.org "mv html/tmp/$version html/downloads/"
ssh ytdl@yt-dl.org "sh html/update_latest.sh $version"
@@
-88,10
+96,6
@@
ROOT=$(pwd)
"$ROOT/devscripts/gh-pages/update-sites.py"
git add *.html *.html.in update
git commit -m "release $version"
"$ROOT/devscripts/gh-pages/update-sites.py"
git add *.html *.html.in update
git commit -m "release $version"
- git show HEAD
- read -p "Is it good, can I push? (y/n) " -n 1
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1; fi
- echo
git push "$ROOT" gh-pages
git push "$ORIGIN_URL" gh-pages
)
git push "$ROOT" gh-pages
git push "$ORIGIN_URL" gh-pages
)
@@
-99,7
+103,7
@@
rm -rf build
make pypi-files
echo "Uploading to PyPi ..."
make pypi-files
echo "Uploading to PyPi ..."
-python setup.py sdist upload
+python setup.py sdist
bdist_wheel
upload
make clean
/bin/echo -e "\n### DONE!"
make clean
/bin/echo -e "\n### DONE!"