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