diff --git a/README.md b/README.md index af21e78e9..8cd867cd3 100644 --- a/README.md +++ b/README.md @@ -29,35 +29,39 @@ This application still in experiment, any change could happen, but it doesn't af ## Todo -- Add template projects for testing commands. +### v0.2.* + - Command `search` is for searching packages. - Add gpm working principle design. -- Add support for downloading tarballs from user sources. -- After downloaded all packages in bundles or snapshots, need to check if all dependencies have been downloaded as well. -- Develop user source API server template application to support user sources in bundles. -- Command `install` and `remove` Add bundle and snapshot parser code for downloading or removing by bundle or snapshot id. -- Add user system to create, edit, upload, and download bundles or snapshots through gpm client program. -- Download package from code.google.com only support hg as version control system, probably support git and svn. -- Collect download and installation results and report to users in the end. -- Command `install` add support for downloading code from git.oschina.net, gitcafe.com, *.codeplex.com; -- Command `install` add support for downloading by tag and branch for packages in git.oschina.net, gitcafe.com. +- Command `install` and `remove` Add bundle and snapshot parser code for downloading or removing by bundle or snapshot. - Command `check` is for checking and downloading all missing dependencies. -- Command `daemon` is for auto-compile web applications when debug it locally. - Command `update` is for checking updates. -- Command `remove` add feature check for dependencies, make sure other packages don't import this one, and give choose for users. - Command `remove` also need to remove files in `GPPATH/bin` and `GOPATH/pkg`. -- Command `remove` add flag `-d` for removing dependencies at the same time. -- Add feature "struct generator". - i18n support for Chinese. - Add built-in application version in order to backup data when users update. - Command `install` add flag `-pc` which only downloads source files(including LICENSE and README). +- Add template projects for testing commands. + +### Future + +- 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 100 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. -- Keep file modify time for packages from github.com. -- 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 `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. +- Develop user source API server template application to support user sources in bundles. +- Add support for downloading tarballs from user sources. +- After downloaded all packages in bundles or snapshots, need to check if all dependencies have been downloaded as well. +- Download package from code.google.com only support hg as version control system, probably support git and svn. +- Command `install` add support for downloading code from git.oschina.net, gitcafe.com, *.codeplex.com; +- Command `install` add support for downloading by tag and branch for packages in git.oschina.net, gitcafe.com. ## License diff --git a/conf/gpm.toml b/conf/gpm.toml index 11d9fcb84..90cb04126 100644 --- a/conf/gpm.toml +++ b/conf/gpm.toml @@ -1,7 +1,7 @@ # This is a configuration file for gpm with toml format. title = "gpm(Go Package Manager)" -version = "v0.1.6 Build 0523" +version = "v0.1.7 Build 0523" user_language = "en-US" #user_language = "zh-CN" diff --git a/doc/bitbucket.go b/doc/bitbucket.go index 6259b5ec7..322eb0577 100644 --- a/doc/bitbucket.go +++ b/doc/bitbucket.go @@ -151,6 +151,9 @@ func GetBitbucketDoc(client *http.Client, match map[string]string, installGOPATH if err != nil { return nil, err } + + // Set modify time. + os.Chtimes(absPath, h.AccessTime, h.ModTime) } var imports []string diff --git a/doc/github.go b/doc/github.go index 584c100a1..033d6e407 100644 --- a/doc/github.go +++ b/doc/github.go @@ -132,15 +132,15 @@ func GetGithubDoc(client *http.Client, match map[string]string, installGOPATH st continue } + // Create diretory before create file. + os.MkdirAll(path.Dir(absPath)+"/", os.ModePerm) + // Get file from archive. rc, err := f.Open() if err != nil { return nil, err } - // Create diretory before create file. - os.MkdirAll(path.Dir(absPath)+"/", os.ModePerm) - // Write data to file fw, _ := os.Create(absPath) if err != nil { @@ -148,11 +148,15 @@ func GetGithubDoc(client *http.Client, match map[string]string, installGOPATH st } _, err = io.Copy(fw, rc) + // Close files. rc.Close() fw.Close() if err != nil { return nil, err } + + // Set modify time. + os.Chtimes(absPath, f.ModTime(), f.ModTime()) } var imports []string diff --git a/install.go b/install.go index 27e4f9c23..15cbf0812 100644 --- a/install.go +++ b/install.go @@ -60,6 +60,7 @@ func checkFlags(flags map[string]bool, enable []string, args []string, print fun // Check auto-enable. for _, v := range enable { flags["-"+v] = true + print("-" + v) } num := 0 // Number of valid flags, use to cut out. @@ -75,6 +76,8 @@ func checkFlags(flags map[string]bool, enable []string, args []string, print fun flags[f] = !v if v { print(f) + } else { + fmt.Println("DISABLE: " + f) } } else { fmt.Printf(fmt.Sprintf("%s\n", promptMsg["UnknownFlag"]), f)