mirror of
https://github.com/thegeeklab/wp-git-clone.git
synced 2024-11-22 00:10:39 +00:00
add git-lfs as test dep to ci
This commit is contained in:
parent
97503f5a47
commit
49276b9116
@ -14,5 +14,6 @@ steps:
|
|||||||
- name: test
|
- name: test
|
||||||
image: docker.io/library/golang:1.21
|
image: docker.io/library/golang:1.21
|
||||||
commands:
|
commands:
|
||||||
- apk --update add --no-cache git git-lfs
|
- apt-get update
|
||||||
|
- apt-get install -y --no-install-recommends git git-lfs
|
||||||
- make test
|
- make test
|
||||||
|
@ -147,6 +147,7 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
|||||||
Usage: "change branch name",
|
Usage: "change branch name",
|
||||||
EnvVars: []string{"PLUGIN_BRANCH", "CI_COMMIT_BRANCH", "CI_REPO_DEFAULT_BRANCH"},
|
EnvVars: []string{"PLUGIN_BRANCH", "CI_COMMIT_BRANCH", "CI_REPO_DEFAULT_BRANCH"},
|
||||||
Destination: &settings.Repo.Branch,
|
Destination: &settings.Repo.Branch,
|
||||||
|
Value: "main",
|
||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
|
@ -3,6 +3,7 @@ properties:
|
|||||||
- name: branch
|
- name: branch
|
||||||
description: |
|
description: |
|
||||||
Change branch name.
|
Change branch name.
|
||||||
|
defaultvalue: "main"
|
||||||
|
|
||||||
- name: ci_netrc_machine
|
- name: ci_netrc_machine
|
||||||
description: |
|
description: |
|
||||||
|
14
git/init.go
14
git/init.go
@ -8,20 +8,12 @@ import (
|
|||||||
func Init(repo Repository) *execabs.Cmd {
|
func Init(repo Repository) *execabs.Cmd {
|
||||||
args := []string{
|
args := []string{
|
||||||
"init",
|
"init",
|
||||||
|
"-b",
|
||||||
|
repo.Branch,
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.Branch != "" {
|
return execabs.Command(
|
||||||
args = []string{
|
|
||||||
"init",
|
|
||||||
"-b",
|
|
||||||
repo.Branch,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd := execabs.Command(
|
|
||||||
gitBin,
|
gitBin,
|
||||||
args...,
|
args...,
|
||||||
)
|
)
|
||||||
|
|
||||||
return cmd
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user