2021-04-26 12:50:38 +00:00
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"os/exec"
|
|
|
|
|
2021-11-25 14:53:44 +00:00
|
|
|
"github.com/digarok/appy/core/project"
|
2021-04-27 20:54:22 +00:00
|
|
|
"github.com/fatih/color"
|
2021-04-26 12:50:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var filesToAssemble []string
|
|
|
|
|
|
|
|
func Assemble() {
|
|
|
|
|
2021-11-25 14:53:44 +00:00
|
|
|
// and assemble
|
|
|
|
var p = project.AppyProj
|
|
|
|
filesToAssemble := p.Assemble
|
|
|
|
//filesToAssemble = viper.GetViper().GetStringSlice("assemble")
|
2021-04-26 12:50:38 +00:00
|
|
|
|
|
|
|
for _, filename := range filesToAssemble {
|
|
|
|
fmt.Printf("Assembling %v\n", filename)
|
|
|
|
|
2021-11-25 14:53:44 +00:00
|
|
|
out, err := exec.Command(project.LocalConf.Programs.Merlin32, "-V", filename).Output()
|
2021-04-26 12:50:38 +00:00
|
|
|
|
|
|
|
if err != nil {
|
2021-04-27 20:54:22 +00:00
|
|
|
color.Cyan(string(out))
|
2021-04-26 12:50:38 +00:00
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|