diff options
| author | Shulhan <ms@kilabit.info> | 2018-06-05 03:29:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-06-05 03:29:52 +0700 |
| commit | 2254dd61175176f92e2529ad9b6166c27cf4a8a3 (patch) | |
| tree | eb2477b440309f5a02c69584339d990528a2be8f | |
| parent | b7cc38e1903a811105374611faefe1a6759f9b98 (diff) | |
| download | beku-2254dd61175176f92e2529ad9b6166c27cf4a8a3.tar.xz | |
gitUpdate: do not return if version is matched with new package version
This will allow freeze operation to work on all packages.
| -rw-r--r-- | package_git.go | 4 | ||||
| -rw-r--r-- | package_test.go | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/package_git.go b/package_git.go index b8a2ed8..dc78959 100644 --- a/package_git.go +++ b/package_git.go @@ -398,10 +398,6 @@ func (pkg *Package) gitUpdate(newPkg *Package) (err error) { } } - if pkg.Version == newPkg.Version { - return - } - err = pkg.gitFetch() if err != nil { err = fmt.Errorf("gitUpdate: %s", err) diff --git a/package_test.go b/package_test.go index 1bb0576..a8632db 100644 --- a/package_test.go +++ b/package_test.go @@ -562,11 +562,12 @@ func testUpdate(t *testing.T) { RemoteURL: "git@github.com:shuLhan/beku_test.git", }, expPkg: &Package{ - vcsMode: VCSModeGit, - ImportPath: testGitRepo, - FullPath: filepath.Join(testEnv.dirSrc, testGitRepo), - RemoteName: gitDefRemoteName, - RemoteURL: "git@github.com:shuLhan/beku_test.git", + vcsMode: VCSModeGit, + ImportPath: testGitRepo, + FullPath: filepath.Join(testEnv.dirSrc, testGitRepo), + RemoteName: gitDefRemoteName, + RemoteURL: "git@github.com:shuLhan/beku_test.git", + VersionNext: "c9f69fb", }, }, { desc: "Update version", |
