Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 1.7 KB

get-start.md

File metadata and controls

91 lines (62 loc) · 1.7 KB

开始使用

配置

安装
$ python setup.py install

安装成功后会在系统用户目录下创建两个文件夹

# Windows
C:\Users\\${user name}\.wing
C:\Users\\${user name}\bin

# Linux/MacOS
/Users/${user name}/.wing
/Users/${user name}/bin
环境变量

Windows:

C:\Users\${user name}\bin添加至系统环境变量

Linux/MacOS:

配置~/bin为可执行全局目录

$ vi ~/.bash_profile
$ export PATH=~/bin:$PATH
$ source ~/.bash_profile

初始化

创建工作空间

添加工作空间对应的代码git库服务地址,如:

# 本地索引模式
# wing -space add {space name} {git host}
# such as:
$ wing -space add test [email protected]/iofomo
$ wing -space add test2 ssh://[email protected]:1022

# 云端索引模式
# wing -space add {space name} {git host} {manifest}
# such as:
$ wing -space add test [email protected]/iofomo manifest.git
$ wing -space add test2 ssh://[email protected]:1022 manifest.git
获取代码
$ mkdir test
$ cd test

# wing init {space name} {branch/tag} {manifest file}
# such as:
$ wing init test master admin.xml

若为本地索引模式,则会在当前目录下自动创建一个空的模板索引文件(.wing/manifests/admin.xml),需要添加要同步的代码库映射关系。

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

    <remote name="origin" fetch=".."/>

    <!-- branch -->
    <default revision="master" remote="origin" sync-j="4"/>

    <!-- TODO add git here ... -->
<!--    <project path="xxx" name="xxx.git" />    -->

</manifest>