contrib/dockerrpm
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 13 May 2014 16:42:31 -0700
changeset 21576 33395a7e5527
parent 21561 f1bcc33a5c52
child 21642 76a347bcdb33
permissions -rwxr-xr-x
revert: group action into a single dictionary We had 4 different variables to hold the list of the 4 possibles actions. I'm grouping them in a single dictionary for a few reasons. First, it makes it clearer they are all related and meant to be the final actions performed by revert. Second this simplifies the parameter of the _performrevert function. Finally the two elements in each entry (list and message) have a different consumers in different functions, this change will make it easier to split them in a later commit.

#!/bin/bash

BUILDDIR=$(dirname $0)
ROOTDIR=$(cd $BUILDDIR/..; pwd)

if which docker >> /dev/null ; then
  DOCKER=docker
elif which docker.io >> /dev/null ; then
  DOCKER=docker.io
fi

$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/"