Browse Source

Merge pull request #4 from gpmgo/dev

Dev
pull/103/head
Joe Chen 11 years ago
parent
commit
ea0f30fe34
  1. 2
      README.md
  2. 16
      cmd/helper_windows.go
  3. 6
      doc/walker.go
  4. 2
      gopm.go
  5. 2
      log/logP.go

2
README.md

@ -19,7 +19,7 @@ USAGE:
gopm [global options] command [command options] [arguments...] gopm [global options] command [command options] [arguments...]
VERSION: VERSION:
0.6.0.1206 0.6.0.1209
COMMANDS: COMMANDS:
get fetch remote package(s) and dependencies to local repository get fetch remote package(s) and dependencies to local repository

16
cmd/helper_windows.go

@ -1,13 +1,16 @@
package cmd package cmd
import ( import (
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings"
"syscall" "syscall"
"unsafe" "unsafe"
"github.com/Unknwon/com"
"github.com/gpmgo/gopm/doc"
) )
func makeLink(srcPath, destPath string) error { func makeLink(srcPath, destPath string) error {
@ -33,12 +36,9 @@ func makeLink(srcPath, destPath string) error {
} }
os.RemoveAll(destPath) os.RemoveAll(destPath)
err := com.CopyDir(srcPath, destPath) return com.CopyDir(srcPath, destPath, func(filePath string) bool {
if err == nil { return strings.Contains(filePath, doc.VENDOR)
// .vendor dir should not be copy })
os.RemoveAll(filepath.Join(destPath, doc.VENDOR))
}
return err
} }
func volumnType(dir string) string { func volumnType(dir string) string {

6
doc/walker.go

@ -117,12 +117,8 @@ func (w *walker) build(srcs []*source, nod *Node) ([]string, error) {
if err != nil { if err != nil {
if nogo { if nogo {
err = nil err = nil
} else if strings.Contains(err.Error(), "expected 'package'") {
log.Warn("walker: %s", err.Error())
return nil, nil
} else { } else {
log.Error("walker", "Error occurs when check imports:") log.Warn("walker: %s", err.Error())
log.Error("", "\t"+err.Error())
return nil, nil return nil, nil
} }
} }

2
gopm.go

@ -29,7 +29,7 @@ import (
// Test that go1.1 tag above is included in builds. main.go refers to this definition. // Test that go1.1 tag above is included in builds. main.go refers to this definition.
const go11tag = true const go11tag = true
const APP_VER = "0.6.0.1207" const APP_VER = "0.6.0.1209"
// //cmd.CmdSearch, // //cmd.CmdSearch,
// cmdClean, // cmdClean,

2
log/logP.go

@ -32,7 +32,7 @@ func errorP(hl, msg string) {
} }
func fatal(hl, msg string) { func fatal(hl, msg string) {
Error(hl, msg) errorP(hl, msg)
os.Exit(2) os.Exit(2)
} }

Loading…
Cancel
Save