aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-06-05 03:29:52 +0700
committerShulhan <ms@kilabit.info>2018-06-05 03:29:52 +0700
commit2254dd61175176f92e2529ad9b6166c27cf4a8a3 (patch)
treeeb2477b440309f5a02c69584339d990528a2be8f
parentb7cc38e1903a811105374611faefe1a6759f9b98 (diff)
downloadbeku-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.go4
-rw-r--r--package_test.go11
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",