Skip to content

Commit 022ecdc

Browse files
committed
Exclude files excludeds on server side copying
1 parent c2f9814 commit 022ecdc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

server.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ func (s *Server) syncFilesScript() (script string) {
197197
if dstf.Delete {
198198
delete = "--delete"
199199
}
200-
script += fmt.Sprintf("rsync -az %s \"%s\" \"%s\"\n", delete, src, dst)
200+
var excludes []string
201+
for _, e := range dstf.Excludeds {
202+
excludes = append(excludes, fmt.Sprintf("--exclude '%s'", e))
203+
}
204+
script += fmt.Sprintf("rsync -az %s %s \"%s\" \"%s\"\n", delete, strings.Join(excludes, " "), src, dst)
201205
}
202206

203207
script += fmt.Sprintf("cp %s/harp/%s/harp-build.info %s/src/%s/\n", s.Home, cfg.App.Name, s.GoPath, cfg.App.ImportPath)

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
const version = 19
3+
const version = 20

0 commit comments

Comments
 (0)