Unverified Commit 467ce323 authored by boklm's avatar boklm
Browse files

Bug 40476: Add staticiforme-prepare-cdn-dist-upload

This is replacing tools/update/publish_version.sh
parent a7b69fa1
#!/bin/bash
set -e
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "$script_dir/functions"
dist_dir="/srv/dist-master.torproject.org/htdocs/torbrowser/$tbb_version"
cat > "$dist_dir/.htaccess" << 'EOF'
RewriteEngine On
RewriteRule ^sha256sums.txt$ sha256sums-unsigned-build.txt
RewriteRule ^sha256sums.txt.asc$ sha256sums-unsigned-build.txt.asc
RewriteRule ^sha256sums.incrementals.txt$ sha256sums-unsigned-build.incrementals.txt
RewriteRule ^sha256sums.incrementals.txt.asc$ sha256sums-unsigned-build.incrementals.txt.asc
EOF
chgrp -R tb-release "$dist_dir"
chmod 775 "$dist_dir"
chmod 664 "$dist_dir"/*
chmod 664 "$dist_dir/.htaccess"
cdn_dir="/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/$tbb_version"
if test -d "$cdn_dir"
then
echo "Error: $cdn_dir already exists" >&2
exit 1
fi
mkdir "$cdn_dir"
chgrp tb-release "$cdn_dir"
chmod 775 "$cdn_dir"
cd "$cdn_dir"
for marfile in "$dist_dir"/*.mar; do
ln -f "$marfile" .
done
echo "$tbb_version is ready to upload to cdn.tpo and dist.tpo"
echo "You should remove the old version(s) before starting the upload with:"
echo ' static-update-component cdn.torproject.org && static-update-component dist.torproject.org'
echo '(preferably using screen or tmux)'
#!/bin/bash
set -e
TORBROWSER_VERSION=$1
if [ -z "${TORBROWSER_VERSION}" ]; then
echo "please specify version number (excluding -buildN)"
exit 1
fi
PREV_TORBROWSER_VERSION=$2
if [ -z "${PREV_TORBROWSER_VERSION}" ]; then
echo "please specify a previous version number (needed for copying .htaccess file)"
exit 1
fi
wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~sysrqb/builds/${TORBROWSER_VERSION}"
#wget --continue -nH --cut-dirs=2 -r -l 1 "https://people.torproject.org/~gk/builds/${TORBROWSER_VERSION}"
rm "${TORBROWSER_VERSION}/index.html*"
date
mv "${TORBROWSER_VERSION}" /srv/dist-master.torproject.org/htdocs/torbrowser/
cp "/srv/dist-master.torproject.org/htdocs/torbrowser/${PREV_TORBROWSER_VERSION}/.htaccess" "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}/"
chmod 775 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
chmod 664 "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"/*
chown -R :torwww "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
cd "/srv/dist-master.torproject.org/htdocs/torbrowser/${TORBROWSER_VERSION}"
for i in *.asc; do echo "$i"; gpg -q "$i" || exit; done
date
static-update-component dist.torproject.org
mkdir "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
chmod 775 "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
cd "/srv/cdn-master.torproject.org/htdocs/aus1/torbrowser/${TORBROWSER_VERSION}"
for marfile in /srv/dist-master.torproject.org/htdocs/torbrowser/"${TORBROWSER_VERSION}"/*.mar; do ln -f "${marfile}" .; done
date
static-update-component cdn.torproject.org
echo "Now sync and publish update responses"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment