From c0f6d6b4c6a4063f41488ef9e642355af21c618c Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 18 Sep 2022 21:47:48 +0200 Subject: [PATCH] add releaserc --- _examples/actions/add_releaserc/go.mod | 11 +++++++++++ _examples/actions/add_releaserc/go.sum | 20 ++++++++++++++++++++ _examples/actions/add_releaserc/kraken.yml | 11 +++++++++++ _examples/actions/add_releaserc/main.go | 12 ++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 _examples/actions/add_releaserc/go.mod create mode 100644 _examples/actions/add_releaserc/go.sum create mode 100644 _examples/actions/add_releaserc/kraken.yml create mode 100644 _examples/actions/add_releaserc/main.go diff --git a/_examples/actions/add_releaserc/go.mod b/_examples/actions/add_releaserc/go.mod new file mode 100644 index 0000000..248ba10 --- /dev/null +++ b/_examples/actions/add_releaserc/go.mod @@ -0,0 +1,11 @@ +module write_a_readme + +go 1.19 + +require github.com/bitfield/script v0.20.2 + +require ( + bitbucket.org/creachadair/shell v0.0.7 // indirect + github.com/itchyny/gojq v0.12.7 // indirect + github.com/itchyny/timefmt-go v0.1.3 // indirect +) diff --git a/_examples/actions/add_releaserc/go.sum b/_examples/actions/add_releaserc/go.sum new file mode 100644 index 0000000..234eb1e --- /dev/null +++ b/_examples/actions/add_releaserc/go.sum @@ -0,0 +1,20 @@ +bitbucket.org/creachadair/shell v0.0.7 h1:Z96pB6DkSb7F3Y3BBnJeOZH2gazyMTWlvecSD4vDqfk= +bitbucket.org/creachadair/shell v0.0.7/go.mod h1:oqtXSSvSYr4624lnnabXHaBsYW6RD80caLi2b3hJk0U= +github.com/bitfield/script v0.20.2 h1:4DexsRtBILVMEn3EZwHbtJdDqdk43sXI8gM3F04JXgs= +github.com/bitfield/script v0.20.2/go.mod h1:l3AZPVAtKQrL03bwh7nlNTUtgrgSWurpJSbtqspYrOA= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/itchyny/gojq v0.12.7 h1:hYPTpeWfrJ1OT+2j6cvBScbhl0TkdwGM4bc66onUSOQ= +github.com/itchyny/gojq v0.12.7/go.mod h1:ZdvNHVlzPgUf8pgjnuDTmGfHA/21KoutQUJ3An/xNuw= +github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921iRkU= +github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/_examples/actions/add_releaserc/kraken.yml b/_examples/actions/add_releaserc/kraken.yml new file mode 100644 index 0000000..0e5c44e --- /dev/null +++ b/_examples/actions/add_releaserc/kraken.yml @@ -0,0 +1,11 @@ +apiVersion: git.front.kjuulh.io/kjuulh/kraken/blob/main/schema/v1 +name: write-a-readme +select: + repositories: + - git@git.front.kjuulh.io:kjuulh/kraken-test.git + # providers: + # - gitea: https://git.front.kjuulh.io + # organisation: "cibus" +actions: + - type: go + entry: "main.go" diff --git a/_examples/actions/add_releaserc/main.go b/_examples/actions/add_releaserc/main.go new file mode 100644 index 0000000..5c24133 --- /dev/null +++ b/_examples/actions/add_releaserc/main.go @@ -0,0 +1,12 @@ +package main + +import "github.com/bitfield/script" + +func main() { + _, err := script. + Echo("# Readme"). + WriteFile("README.md") + if err != nil { + panic(err) + } +}