mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Correctly checkout branches
This commit is contained in:
parent
f6b84e5b9a
commit
6b1437ca75
@ -101,13 +101,18 @@ if(is_dir("$CODIR/mainline")) {
|
||||
exec("cd $CODIR/mainline && git fetch");
|
||||
} else {
|
||||
exec("cd $CODIR && git clone $GIT_REPO");
|
||||
exec("cd $CODIR/mainline && git fetch && git checkout -b $BRANCHTAG origin/$BRANCHTAG");
|
||||
exec("cd $CODIR/mainline && git fetch");
|
||||
}
|
||||
|
||||
if($branch == "master")
|
||||
if($branch == "master") {
|
||||
exec("cd $CODIR/mainline && git checkout master");
|
||||
else
|
||||
exec("cd $CODIR/mainline && git checkout $BRANCHTAG");
|
||||
} else {
|
||||
$current_branch=`git branch | grep $BRANCHTAG`
|
||||
if($current_branch == "")
|
||||
exec("cd $CODIR/mainline && git fetch && git checkout -b $BRANCHTAG origin/$BRANCHTAG");
|
||||
else
|
||||
exec("cd $CODIR/mainline && git checkout $BRANCHTAG");
|
||||
}
|
||||
|
||||
exec("mkdir -p /tmp/lighttpd/cache/compress/");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user