Skip to content

Commit

Permalink
Add additionalCmds option
Browse files Browse the repository at this point in the history
  • Loading branch information
k-awata committed Oct 23, 2024
1 parent e784034 commit f8264a6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

const (
CliName = "rvmbuilder"
Version = "0.1.1"
Version = "0.2.0"
)

const UTF8BOM = "\xef\xbb\xbf"
Expand Down
1 change: 1 addition & 0 deletions pml.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func MakePml(b *RvmBuilder) (string, error) {
"incl": e.ExportInclude,
"excl": e.ExportExclude,
"input": filepath.Join(b.WorkingDir, WRK_INPUT),
"excmd": e.AdditionalCmds,
}); err != nil {
return "", err
}
Expand Down
7 changes: 7 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@
"type": "string"
},
"type": "array"
},
"additionalCmds": {
"description": "Additional PML commands",
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
Expand Down
4 changes: 4 additions & 0 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type ExportOption struct {
AutoColorRules []AutoColorRule `json:"autoColorRules,omitempty"`
ExportInclude []string `json:"exportInclude,omitempty"`
ExportExclude []string `json:"exportExclude,omitempty"`
AdditionalCmds []string `json:"additionalCmds,omitempty"`
}

type RvmBuilder struct {
Expand Down Expand Up @@ -130,4 +131,7 @@ func (e *ExportOption) Merge(o *ExportOption) {
if len(o.ExportExclude) != 0 {
e.ExportExclude = o.ExportExclude
}
if len(o.AdditionalCmds) != 0 {
e.AdditionalCmds = o.AdditionalCmds
}
}
3 changes: 3 additions & 0 deletions template/exportrvm.mac
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export {{.}}
{{- range .excl}}
export exclude {{.}}
{{- end}}
{{- range .excmd}}
{{.}}
{{- end}}
export finish
syscom |echo {{.file}} >> "{{.input}}"|
var !clock clock
Expand Down

0 comments on commit f8264a6

Please sign in to comment.