Fix updating releases/.htaccesss

Fixes https://github.com/NixOS/nixpkgs/issues/9228.
This commit is contained in:
Eelco Dolstra 2015-08-13 14:16:34 +02:00
parent c76fc42d03
commit 87ccf9de70

View file

@ -36,7 +36,7 @@ echo "release is $release (build $releaseId), eval is $url, dir is
# built. FIXME: get this from Hydra directly. # built. FIXME: get this from Hydra directly.
shortRev=$(echo "$release" | sed 's/.*\.//') shortRev=$(echo "$release" | sed 's/.*\.//')
rev=$(git rev-parse "$shortRev") rev=$(git rev-parse "$shortRev")
echo "revision is $rev" echo "revision is $rev" >&2
if [ -d $releaseDir ]; then if [ -d $releaseDir ]; then
echo "release already exists" >&2 echo "release already exists" >&2
@ -104,8 +104,8 @@ flock -x $channelsDir/.htaccess.lock -c "cat $channelsDir/.htaccess-nix* > $chan
cd "$channelsDir" cd "$channelsDir"
rsync -avR . hydra-mirror@nixos.org:"$channelsDir" --delete >&2 rsync -avR . hydra-mirror@nixos.org:"$channelsDir" --delete >&2
# Update the nixpkgs-channels repo. # Update the nixpkgs-channels repo. FIXME: protect against concurrent access
git remote update nixpkgs git remote update nixpkgs >&2
git push nixpkgs-channels "$rev:refs/heads/$channelName" git push nixpkgs-channels "$rev:refs/heads/$channelName" >&2
echo "$releaseDir" echo "$releaseDir"