1
mirror of https://github.com/yt-dlp/yt-dlp synced 2024-12-25 04:13:46 +01:00

Less git acrobatics in devscripts/release.sh

This commit is contained in:
Philipp Hagemeister 2013-01-11 08:28:37 +01:00
parent 142d38f776
commit 09f9552b40

View File

@ -47,37 +47,39 @@ REV=$(git rev-parse HEAD)
make youtube-dl youtube-dl.tar.gz make youtube-dl youtube-dl.tar.gz
wget "http://jeromelaheurte.net:8142/download/rg3/youtube-dl/youtube-dl.exe?rev=$REV" -O youtube-dl.exe || \ wget "http://jeromelaheurte.net:8142/download/rg3/youtube-dl/youtube-dl.exe?rev=$REV" -O youtube-dl.exe || \
wget "http://jeromelaheurte.net:8142/build/rg3/youtube-dl/youtube-dl.exe?rev=$REV" -O youtube-dl.exe wget "http://jeromelaheurte.net:8142/build/rg3/youtube-dl/youtube-dl.exe?rev=$REV" -O youtube-dl.exe
mkdir -p "update_staging/$version" mkdir -p "build/$version"
mv youtube-dl youtube-dl.exe "update_staging/$version" mv youtube-dl youtube-dl.exe "build/$version"
mv youtube-dl.tar.gz "update_staging/$version/youtube-dl-$version.tar.gz" mv youtube-dl.tar.gz "build/$version/youtube-dl-$version.tar.gz"
RELEASE_FILES="youtube-dl youtube-dl.exe youtube-dl-$version.tar.gz" RELEASE_FILES="youtube-dl youtube-dl.exe youtube-dl-$version.tar.gz"
(cd update_staging/$version/ && md5sum $RELEASE_FILES > MD5SUMS) (cd build/$version/ && md5sum $RELEASE_FILES > MD5SUMS)
(cd update_staging/$version/ && sha1sum $RELEASE_FILES > SHA1SUMS) (cd build/$version/ && sha1sum $RELEASE_FILES > SHA1SUMS)
(cd update_staging/$version/ && sha256sum $RELEASE_FILES > SHA2-256SUMS) (cd build/$version/ && sha256sum $RELEASE_FILES > SHA2-256SUMS)
(cd update_staging/$version/ && sha512sum $RELEASE_FILES > SHA2-512SUMS) (cd build/$version/ && sha512sum $RELEASE_FILES > SHA2-512SUMS)
git checkout HEAD -- youtube-dl youtube-dl.exe git checkout HEAD -- youtube-dl youtube-dl.exe
echo "\n### Signing and uploading the new binaries to youtube-dl.org..." echo "\n### Signing and uploading the new binaries to youtube-dl.org..."
for f in $RELEASE_FILES; do gpg --detach-sig "update_staging/$version/$f"; done for f in $RELEASE_FILES; do gpg --detach-sig "build/$version/$f"; done
scp -r "update_staging/$version" ytdl@youtube-dl.org:html/downloads/ scp -r "build/$version" ytdl@youtube-dl.org:html/downloads/
rm -r update_staging
echo "\n### Now switching to gh-pages..." echo "\n### Now switching to gh-pages..."
git checkout gh-pages git clone --branch gh-pages --single-branch . build/gh-pages
git checkout "$MASTER" -- devscripts/gh-pages/ ROOT=$(pwd)
git reset devscripts/gh-pages/ (
devscripts/gh-pages/add-version.py $version set -e
devscripts/gh-pages/sign-versions.py < updates_key.pem cd build/gh-pages
devscripts/gh-pages/generate-download.py ORIGIN_URL=$(git config --get remote.origin.url)
devscripts/gh-pages/update-copyright.py "$ROOT/devscripts/gh-pages/add-version.py" $version
git add *.html *.html.in update "$ROOT/devscripts/gh-pages/sign-versions.py" < updates_key.pem
git commit -m "release $version" "$ROOT/devscripts/gh-pages/generate-download.py"
git show HEAD "$ROOT/devscripts/gh-pages/update-copyright.py"
read -p "Is it good, can I push? (y/n) " -n 1 git add *.html *.html.in update
if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1; fi git commit -m "release $version"
echo git show HEAD
git push origin gh-pages read -p "Is it good, can I push? (y/n) " -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1; fi
echo
git push $ORIGIN_URL gh-pages
)
rm -r build
echo "\n### DONE!" echo "\n### DONE!"
rm -r devscripts
git checkout $MASTER