Add copy command

This commit is contained in:
kolaente 2020-09-02 18:44:15 +02:00
parent 6a589a65c7
commit c1bd463c46
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 0 deletions

View File

@ -464,8 +464,17 @@ func (Release) Compress(ctx context.Context) error {
return errs.Wait()
}
// Copies all built binaries to dist/release/ in preparation for creating the os packages
func (Release) Copy() {
// $(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
filepath.Walk(RootPath+"/"+DIST+"/binaries/", func(path string, info os.FileInfo, err error) error {
// Only executable files
if !strings.Contains(info.Name(), Executable) {
return nil
}
return os.Link(path, RootPath+"/"+DIST+"/release/"+info.Name())
})
}
func (Release) OsPackage() {