开发者

Phing - Pulling from Github Repository

开发者 https://www.devze.com 2023-04-10 18:07 出处:网络
I am trying to use Phing to call git and pull a remote private repository, but it\'s not working. Here is my code for Phing:

I am trying to use Phing to call git and pull a remote private repository, but it's not working.

Here is my code for Phing:

<project name="test" default="main">
    <!-- Get User Variables -->
    <property file="build.properties" />

    <!-- Declare Variables -->
    <property name="base.dir" value="../" />
    <property name="git.repository" value="git@github.com:test/test.git" />

    <!-- Pull Git Release -->
    <target name="git.pull">
        <gitpull 
            repository="${git.repository}" 
   开发者_如何转开发         source="origin" 
            refspec="${git.release}"
        />
    </target>

    <target name="main" depends="git.pull">
    </target>
</project>

But when I run I get this error:

You must specify readable directory as repository.

Does anyone know how to do this? Or have a working example?


For pull you must give a local repository. The remote repository (the one, where to pull from) is the one you give with source

You can find examples in the test https://github.com/phingofficial/phing/blob/master/test/etc/tasks/ext/git/GitPullTaskTest.xml


Target directory is must exist. But, it's must empty. It is not to include .git directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号