From 5fd290852cf64ce661afffdf3f36fff8c7be8034 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Dec 2015 11:42:49 +0100 Subject: [PATCH] Do a git update before doing rev-parse --- mirror-nixos-branch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror-nixos-branch.sh b/mirror-nixos-branch.sh index f7b6c92..e9a440e 100755 --- a/mirror-nixos-branch.sh +++ b/mirror-nixos-branch.sh @@ -44,6 +44,7 @@ fi # Figure out the Git revision from which this release was # built. FIXME: get this from Hydra directly. +git remote update nixpkgs >&2 shortRev=$(echo "$release" | sed 's/.*\.//') rev=$(git rev-parse "$shortRev") echo "revision is $rev" >&2 @@ -119,7 +120,6 @@ cd "$channelsDir" rsync -avR . hydra-mirror@nixos.org:"$channelsDir" --delete >&2 # Update the nixpkgs-channels repo. -git remote update nixpkgs >&2 git push nixpkgs-channels "$rev:refs/heads/$channelName" >&2 echo "$releaseDir"