Compare commits
14 Commits
kraken-app
...
3ef688a00d
Author | SHA1 | Date | |
---|---|---|---|
3ef688a00d | |||
fa8985a0e7
|
|||
1ff0014ad4 | |||
9696270d22 | |||
0cb923a3a5 | |||
ce55f6523c
|
|||
564147eb6a
|
|||
fcd369d48f
|
|||
c759f8e698
|
|||
fd7b06e840 | |||
c7e773be93
|
|||
559fb41571 | |||
1b14d33a53 | |||
d9404525f5
|
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
- "v0.x"
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- "@semantic-release/commit-analyzer"
|
|
||||||
- "@semantic-release/release-notes-generator"
|
|
||||||
- "@semantic-release/changelog"
|
|
||||||
- "@semantic-release/git"
|
|
||||||
|
|
@@ -9,19 +9,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func CreateKrakenProcessCmd() *cobra.Command {
|
func CreateKrakenProcessCmd() *cobra.Command {
|
||||||
|
|
||||||
var (
|
|
||||||
actionsRepo string
|
|
||||||
branch string
|
|
||||||
path string
|
|
||||||
)
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "process",
|
Use: "process",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
Run: func(cmd *cobra.Command, _ []string) {
|
||||||
if err := cmd.ParseFlags(args); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
client := http.Client{}
|
client := http.Client{}
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
@@ -31,9 +21,9 @@ func CreateKrakenProcessCmd() *cobra.Command {
|
|||||||
Branch string `json:"branch"`
|
Branch string `json:"branch"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
}{
|
}{
|
||||||
Repository: actionsRepo,
|
Repository: "git@git.front.kjuulh.io:kjuulh/kraken.git",
|
||||||
Branch: branch,
|
Branch: "feature/query-results",
|
||||||
Path: path,
|
Path: "_examples/queries/scrape_readme/",
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -56,18 +46,8 @@ func CreateKrakenProcessCmd() *cobra.Command {
|
|||||||
if resp.StatusCode >= 300 {
|
if resp.StatusCode >= 300 {
|
||||||
panic(resp.Status)
|
panic(resp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
pf := cmd.PersistentFlags()
|
|
||||||
|
|
||||||
pf.StringVar(&actionsRepo, "actions-repo", "", "actions repo is the location of your actions, not where to apply the actions themselves, that should be self contained")
|
|
||||||
cmd.MarkPersistentFlagRequired("actions-repo")
|
|
||||||
pf.StringVar(&branch, "branch", "main", "which branch to look for actions in, will default to main")
|
|
||||||
pf.StringVar(&path, "path", "", "the location of the path inside the repository")
|
|
||||||
cmd.MarkPersistentFlagRequired("path")
|
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@@ -242,7 +242,7 @@ func (g *Git) CreateBranch(ctx context.Context, gitRepo *GitRepo) error {
|
|||||||
err = worktree.PullContext(ctx, &git.PullOptions{
|
err = worktree.PullContext(ctx, &git.PullOptions{
|
||||||
RemoteName: "origin",
|
RemoteName: "origin",
|
||||||
ReferenceName: "refs/heads/main",
|
ReferenceName: "refs/heads/main",
|
||||||
SingleBranch: false,
|
SingleBranch: true,
|
||||||
Depth: 1,
|
Depth: 1,
|
||||||
Auth: auth,
|
Auth: auth,
|
||||||
RecurseSubmodules: 1,
|
RecurseSubmodules: 1,
|
||||||
|
@@ -35,8 +35,6 @@
|
|||||||
- [ ] Make configurable git provider
|
- [ ] Make configurable git provider
|
||||||
- [ ] Create templating function
|
- [ ] Create templating function
|
||||||
- [ ] Add way to see progress of runners
|
- [ ] Add way to see progress of runners
|
||||||
- [ ] Implement global .kraken store for easy access
|
|
||||||
- [ ] Move builders to start instead of every time
|
|
||||||
|
|
||||||
## Version 1.x
|
## Version 1.x
|
||||||
|
|
||||||
|
@@ -2,7 +2,4 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
current_branch=$(git branch --show-current)
|
go run cmd/kraken/kraken.go process
|
||||||
|
|
||||||
go run cmd/kraken/kraken.go process --actions-repo "git@git.front.kjuulh.io:kjuulh/kraken.git" --branch "$current_branch" --path "_examples/actions/write_a_readme"
|
|
||||||
go run cmd/kraken/kraken.go process --actions-repo "git@git.front.kjuulh.io:kjuulh/kraken.git" --branch "$current_branch" --path "_examples/queries/scrape_readme"
|
|
||||||
|
Reference in New Issue
Block a user