Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var UpFlagsDefault = &UpCmdFlags{
initRegistry: true,
build: true,
sync: true,
deploy: true,
deploy: false,
portforwarding: true,
noSleep: false,
}
Expand Down Expand Up @@ -146,8 +146,10 @@ func (cmd *UpCmd) Run(cobraCmd *cobra.Command, args []string) {
log.Fatalf("Unable to create new kubectl client: %s", err.Error())
}

var shouldRebuild bool

if cmd.flags.build {
shouldRebuild := cmd.shouldRebuild(cobraCmd.Flags().Changed("build"))
shouldRebuild = cmd.shouldRebuild(cobraCmd.Flags().Changed("build"))

if shouldRebuild {
cmd.buildImage()
Expand All @@ -164,7 +166,7 @@ func (cmd *UpCmd) Run(cobraCmd *cobra.Command, args []string) {
}
}

if cmd.flags.deploy {
if cmd.flags.deploy || shouldRebuild {
cmd.deployChart()
} else {
cmd.initHelm()
Expand Down
4 changes: 2 additions & 2 deletions pkg/devspace/sync/sync_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func createFileAndWait(from, to, postfix string) error {
ioutil.WriteFile(filenameFrom, []byte(fileContents), 0666)

for i := 0; i < 50; i++ {
time.Sleep(time.Millisecond * 100)

if _, err := os.Stat(filenameTo); err == nil {
data, err := ioutil.ReadFile(filenameTo)
if err != nil {
Expand All @@ -111,8 +113,6 @@ func createFileAndWait(from, to, postfix string) error {

return nil
}

time.Sleep(time.Millisecond * 100)
}

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