Skip to content

Commit 41ac78d

Browse files
authored
Merge pull request #155 from covexo/dont-redeploy
Resolve #143
2 parents 2c5bff8 + 6b2391f commit 41ac78d

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

cmd/up.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var UpFlagsDefault = &UpCmdFlags{
6262
initRegistry: true,
6363
build: true,
6464
sync: true,
65-
deploy: true,
65+
deploy: false,
6666
portforwarding: true,
6767
noSleep: false,
6868
}
@@ -146,8 +146,10 @@ func (cmd *UpCmd) Run(cobraCmd *cobra.Command, args []string) {
146146
log.Fatalf("Unable to create new kubectl client: %s", err.Error())
147147
}
148148

149+
var shouldRebuild bool
150+
149151
if cmd.flags.build {
150-
shouldRebuild := cmd.shouldRebuild(cobraCmd.Flags().Changed("build"))
152+
shouldRebuild = cmd.shouldRebuild(cobraCmd.Flags().Changed("build"))
151153

152154
if shouldRebuild {
153155
cmd.buildImage()
@@ -164,7 +166,7 @@ func (cmd *UpCmd) Run(cobraCmd *cobra.Command, args []string) {
164166
}
165167
}
166168

167-
if cmd.flags.deploy {
169+
if cmd.flags.deploy || shouldRebuild {
168170
cmd.deployChart()
169171
} else {
170172
cmd.initHelm()

pkg/devspace/sync/sync_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ func createFileAndWait(from, to, postfix string) error {
100100
ioutil.WriteFile(filenameFrom, []byte(fileContents), 0666)
101101

102102
for i := 0; i < 50; i++ {
103+
time.Sleep(time.Millisecond * 100)
104+
103105
if _, err := os.Stat(filenameTo); err == nil {
104106
data, err := ioutil.ReadFile(filenameTo)
105107
if err != nil {
@@ -111,8 +113,6 @@ func createFileAndWait(from, to, postfix string) error {
111113

112114
return nil
113115
}
114-
115-
time.Sleep(time.Millisecond * 100)
116116
}
117117

118118
return fmt.Errorf("Created file %s wasn't correctly synced to %s", filenameFrom, filenameTo)

0 commit comments

Comments
 (0)