From e64829aeeda49457b060bbf7eff89af82646764c Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 24 May 2013 20:47:47 -0400 Subject: [PATCH] command check add feature checks subdirs deps --- README.md | 21 +++++++++++---------- check.go | 4 +++- docs/Quick_Start.md | 2 +- i18n/en-US/prompt.txt | 1 - i18n/en-US/usage_install.txt | 2 -- i18n/zh-CN/prompt.txt | 1 - i18n/zh-CN/usage_install.txt | 2 -- install.go | 3 --- 8 files changed, 15 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1871acda8..e1d6ec1e2 100644 --- a/README.md +++ b/README.md @@ -33,25 +33,29 @@ This application still in experiment, any change could happen, but it doesn't af ## Todo -### v0.2.* +### v0.3.* + +- Command `install` and `remove` give number to let user choose operate one package. +- Command `search` add flags `-n` and `-o` for number of list items and offset. +- Add gpm working principle design. +- Complete documentation. ### Future - Command `check` add feature to update or generate gopack.json. - Command `install` generates dependencies configuration file. - Command `build` use dependencies configuration file to build with specific versions of dependencies, if VCS tools are available, simply use `checkout`. -- Command `install` and `remove` give number to let user choose operate one package. -- Command `search` add flags `-n` and `-o` for number of list items and offset. +- Command `remove` add flag `-d` for removing dependencies at the same time. +- Command `remove` add feature check for dependencies, make sure other packages don't import this one, and give choose for users. +- Command `install` save tarball add support for packages in code.google.com, bitbucket.org, launchpad.net, git.oschina.net, gitcafe.com, *.codeplex.com. - Command `update` is for checking updates. - Command `sync` is for sync packages in two computers, support client and server mode through ssh. - Command `init` is for auto-configuring Go develop environment. - Command `install` and `remove` and `update` backup data(up to 50 records) before executing. - Command `rollback` is for rolling back to certain operation. - Add feature "struct generator". -- Command `remove` add flag `-d` for removing dependencies at the same time. -- Command `remove` add feature check for dependencies, make sure other packages don't import this one, and give choose for users. -- Command `install` add flag `-all` for re-installing everything in GOPATH, usually use this after upgrading Go version. -- Command `clean` is for cleaning empty directories. +- Command `install` add flag `-all` for re-installing everything in GOPATH, usually use this after upgraded Go version. +- Command `clean` is for cleaning empty directories and backup. - Command `daemon` is for auto-compile web applications when debug it locally. - Collect download and installation results and report to users in the end. - Add user system to create, edit, upload, and download bundles or snapshots through gpm client program. @@ -64,9 +68,6 @@ This application still in experiment, any change could happen, but it doesn't af - Command `install` and `remove` add bundle parse code for getting data from server. - Command `install` and `remove` add snapshot parse code for downloading or removing snapshot. - Add built-in application version in order to backup data when users update. -- Add gpm working principle design. -- Command `install -c` add arguments for add more exts. -- Command `install` save tarball add support for packages in code.google.com, bitbucket.org, launchpad.net, git.oschina.net, gitcafe.com, *.codeplex.com. ## Credits diff --git a/check.go b/check.go index a4fa71dee..74ceec2fb 100644 --- a/check.go +++ b/check.go @@ -170,8 +170,10 @@ func checkIsExistWithVCS(path string) bool { return false } - if len(dirs) != 1 { + if len(dirs) > 1 { return true + } else if len(dirs) == 0 { + return false } switch dirs[0].Name() { diff --git a/docs/Quick_Start.md b/docs/Quick_Start.md index 9ce5e10d7..65b93293f 100644 --- a/docs/Quick_Start.md +++ b/docs/Quick_Start.md @@ -59,7 +59,7 @@ Because we don't have all kinds of operating systems, we need your help to compl **Attention** Because we use API to get information of packages that are hosted on github.com, but it limits 60 requests per hour, so you may get errors if you download too much(more than 50 packages per hour). We do not provider access token for security reason, but we do have configure option `github_access_token` in configuration file `conf/gpm.toml`, so you can go to [here](https://github.com/settings/applications) and create your personal access token(up to 5000 request per hour), and set it in `gpm.toml`. -**Attention** If your computer has been installed others software that called `gpm` also, you can change executable name to something else, for example `gpmgo`, and use `gpmgo` in all commands. +**Attention** If your computer has been installed other software that called `gpm` also, you may want to change executable name to something else, for example `gpmgo`, and use `gpmgo` in all commands. ## Install package, or packages diff --git a/i18n/en-US/prompt.txt b/i18n/en-US/prompt.txt index b3cdf7086..2be730d76 100644 --- a/i18n/en-US/prompt.txt +++ b/i18n/en-US/prompt.txt @@ -15,7 +15,6 @@ CheckImports=Fail to check dependencies[ %s ] MovedFile=SUCCESS: Moved file from $GOPATH(%s) to current directory(%s). PureDownload=You enabled pure download. -PureCode=You enabled pure code. DownloadOnly=You enabled download without installing. DownloadExDeps=You enabled download dependencies in example. DownloadFromSrcs=You enabled download from sources. diff --git a/i18n/en-US/usage_install.txt b/i18n/en-US/usage_install.txt index fbf8c226e..c140ae79a 100644 --- a/i18n/en-US/usage_install.txt +++ b/i18n/en-US/usage_install.txt @@ -9,8 +9,6 @@ The install flags are: -p pure download packages without version control. - -c - download source code only. -d download without installing packages. -u diff --git a/i18n/zh-CN/prompt.txt b/i18n/zh-CN/prompt.txt index d3ae329f4..28a4d332a 100644 --- a/i18n/zh-CN/prompt.txt +++ b/i18n/zh-CN/prompt.txt @@ -15,7 +15,6 @@ CheckImports=一百遍检查失败 [ %s ] MovedFile=SUCCESS: 成功将文件从 $GOPATH(%s) 移动至当前目录 (%s). PureDownload=已激活纯净下载模式. -PureCode=已激活纯代码下载模式. DownloadOnly=已激活无安装模式. DownloadExDeps=已激活下载示例代码依赖. DownloadFromSrcs=已激活从用户源下载. diff --git a/i18n/zh-CN/usage_install.txt b/i18n/zh-CN/usage_install.txt index a84a49f24..a0601df4e 100644 --- a/i18n/zh-CN/usage_install.txt +++ b/i18n/zh-CN/usage_install.txt @@ -7,8 +7,6 @@ Install 命令下载并安装 Go 包及其依赖包. -p 无版本控制的纯净下载. - -c - 只下载代码文件. -d 下载但不安装包. -u diff --git a/install.go b/install.go index 0a2a10259..894d8a232 100644 --- a/install.go +++ b/install.go @@ -33,7 +33,6 @@ func init() { cmdInstall.Run = runInstall cmdInstall.Flags = map[string]bool{ "-p": false, - "-c": false, "-d": false, "-u": false, // Flag for 'go get'. "-e": false, @@ -47,8 +46,6 @@ func printInstallPrompt(flag string) { switch flag { case "-p": fmt.Printf(fmt.Sprintf("%s\n", promptMsg["PureDownload"])) - case "-c": - fmt.Printf(fmt.Sprintf("%s\n", promptMsg["PureCode"])) case "-d": fmt.Printf(fmt.Sprintf("%s\n", promptMsg["DownloadOnly"])) case "-e":