mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 00:43:26 +08:00
9.8
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#9.9 通过git打包和安装
|
||||
##9.9.1 安装到github
|
||||
# 9.9 通过 git 打包和安装
|
||||
|
||||
216
|
||||
##9.9.1 安装到github
|
||||
以上的方式对于本地包来说是可以的,但是我们如何打包代码到开发者圈子呢?那么我们需要一个云端的源码的版本控制系统,比如著名的git。
|
||||
|
||||
在Linux和OS X的机器上git是默认安装的,在windows上你必须先自行安装,参见http://
|
||||
@@ -18,11 +20,11 @@
|
||||
现在必须去登录github网站: https://github.com
|
||||
|
||||
也许你还不能登录,你可以去https://github.com/plans注册一个开源项目的免费帐号。输入正确的帐号密码和有效的邮箱地址并进一步创建用户。然后你将获得一个git命令的列表。本地仓库的操作的命令已经完成。一个优秀的系统http://help.github.com/在你遇到任何问题的时候将引导你。
|
||||
|
||||
在云端创建一个新的uc仓库;发布的指令为(NNNN替代用户名):
|
||||
|
||||
在云端创建一个新的uc仓库;发布的指令为(NNNN替代用户名):
|
||||
|
||||
git remote add orign git@github.com:NNNN/uc.git
|
||||
git push -u origin master
|
||||
git push -u origin master
|
||||
|
||||
操作完成后检查github上的包页面: http://github.com/NNNN/uc
|
||||
|
||||
@@ -33,7 +35,7 @@ NNNN是你在github上的用户名
|
||||
|
||||
复制
|
||||
->uc.a包到目录$GOROOT/PKG/LINUX_AMD64/github.com
|
||||
->源码到$GOROOT/src/pkg/github.com/NNNN/uc
|
||||
->源码到$GOROOT/src/pkg/github.com/NNNN/uc
|
||||
|
||||
这样现在这台机器上的其他Go应用程序也可以通过导入路径:"github.com/NNNN/uc"代替"./uc/uc"来使用。
|
||||
|
||||
@@ -51,4 +53,4 @@ Gomake(和go install)将通过$GOROOT下的本地版本进行工作。
|
||||
* github(git)
|
||||
* googlecode(hg/git/svn)
|
||||
* launchpad(bzr)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user