Small example showing how to execute a Skycfg Starlark script and serialize the result as YAML.
$ go run . nginx.skymetadata:
name: nginx| # These have been tested against: | |
| # macOS 12.6 / built-in | |
| # Alpine 3.16.2 / BusyBox v1.35 | |
| # Debian 11.5 / GNU sed v4.7 | |
| # short, readable, should be fine for most purposes! | |
| sed -n -e 's/^go \(.*\)$/\1/p' go.mod | |
| # strict based on https://go.dev/ref/mod#go-mod-file-go | |
| # > The version must be a valid Go release version: a positive |
| . (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") | |
| if (test-path env:github_posh_git) { | |
| . $env:github_posh_git\profile.example.ps1 | |
| } |
| [diff] | |
| tool = vsdiffmerge | |
| [difftool] | |
| prompt = true | |
| [difftool "vsdiffmerge"] | |
| cmd = \""C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\vsdiffmerge.exe"\" \""$LOCAL"\" \""$REMOTE"\" //t | |
| keepbackup = false | |
| trustexistcode = true | |
| [merge] | |
| tool = vsdiffmerge |