@@ -8,26 +8,24 @@ import (
8
8
"testing"
9
9
10
10
"github.com/ddkwork/golibrary/mylog"
11
- "github.com/ddkwork/golibrary/safemap"
12
11
"github.com/ddkwork/golibrary/stream"
13
12
)
14
13
15
14
func TestUpdateAppModule (t * testing.T ) {
16
- for k , v := range safemap. NewOrdered [ string , string ]( func ( yield func ( string , string ) bool ) {
17
- yield ( " github.com/ddkwork/toolbox", "D:\\ workspace\\ workspace\\ demo\\ toolbox" )
18
- yield ( "github.com/ddkwork/unison" , "D: \\ workspace \\ workspace \\ demo \\ unison" )
19
- yield ( "github.com/ddkwork/app" , "D: \\ workspace \\ workspace \\ demo \\ app " )
20
- }). Range () {
21
- hash := stream . GetLastCommitHashLocal ( k , v )
22
- cmd := "go get -x " + k + "@" + hash
23
- mylog . Check ( os . Chdir ( v ) )
24
- stream .RunCommand (cmd )
25
- stream .RunCommand ("go mod tidy" )
26
- cleaner ()
27
- }
15
+ mylog . Check ( os . Chdir ( "D: \\ workspace \\ workspace \\ demo \\ unison" ))
16
+ cmd := "go get -x " + " github.com/ddkwork/toolbox" + "@" + stream . GetLastCommitHashLocal ( "D:\\ workspace\\ workspace\\ demo\\ toolbox" )
17
+ stream . RunCommand ( cmd )
18
+ stream . RunCommand ( "go mod tidy " )
19
+ cleaner ()
20
+
21
+ mylog . Check ( os . Chdir ( "D: \\ workspace \\ workspace \\ demo \\ app" ))
22
+ cmd = "go get -x " + "github.com/ddkwork/unison" + "@" + stream . GetLastCommitHashLocal ( "D: \\ workspace \\ workspace \\ demo \\ unison" )
23
+ stream .RunCommand (cmd )
24
+ stream .RunCommand ("go mod tidy" )
25
+ cleaner ()
26
+
28
27
mylog .Check (os .Chdir ("D:\\ workspace\\ workspace\\ gui" ))
29
- hash := stream .GetLastCommitHashLocal ("github.com/ddkwork/app" , "D:\\ workspace\\ workspace\\ demo\\ app" )
30
- cmd := "go get -x " + "github.com/ddkwork/app" + "@" + hash
28
+ cmd = "go get -x " + "github.com/ddkwork/app" + "@" + stream .GetLastCommitHashLocal ("D:\\ workspace\\ workspace\\ demo\\ app" )
31
29
stream .RunCommand (cmd )
32
30
stream .RunCommand ("go mod tidy" )
33
31
cleaner ()
0 commit comments