[git recipe_module] Add tags flag for fetch
Some projects that use the git module (eg flutter) require tags. Bug: 870558 Change-Id: Idae50ef5c8a092e5f0109b6c14c562268a2ad236 Reviewed-on: https://chromium-review.googlesource.com/c/1274245 Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org> Commit-Queue: Ryan Tseng <hinoka@chromium.org>changes/45/1274245/2
parent
83bd7f4cd5
commit
2fddb95698
@ -0,0 +1,225 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
|
||||
"--path",
|
||||
"[START_DIR]/src",
|
||||
"--url",
|
||||
"https://chromium.googlesource.com/chromium/src.git"
|
||||
],
|
||||
"name": "git setup"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"retry",
|
||||
"fetch",
|
||||
"origin",
|
||||
"master",
|
||||
"--recurse-submodules",
|
||||
"--progress",
|
||||
"--tags"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"env": {
|
||||
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "git fetch"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"checkout",
|
||||
"-f",
|
||||
"FETCH_HEAD"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git checkout"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"rev-parse",
|
||||
"HEAD"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "read revision",
|
||||
"stdout": "/path/to/tmp/",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"clean",
|
||||
"-f",
|
||||
"-d",
|
||||
"-x"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git clean"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"submodule",
|
||||
"sync"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "submodule sync"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"submodule",
|
||||
"update",
|
||||
"--init",
|
||||
"--recursive"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "submodule update"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"-c",
|
||||
"foo=bar",
|
||||
"count-objects",
|
||||
"-v"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "count-objects",
|
||||
"stdout": "/path/to/tmp/"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"config",
|
||||
"--get",
|
||||
"remote.origin.url"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git config remote.origin.url",
|
||||
"stdout": "/path/to/tmp/",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_TEXT@foo@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"show",
|
||||
"HEAD",
|
||||
"--format=%at",
|
||||
"-s"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git show",
|
||||
"stdout": "/path/to/tmp/"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"fetch",
|
||||
"origin",
|
||||
"--tags"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git fetch tags"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"status"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git status"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"status"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git status can_fail_build"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"status"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git status cannot_fail_build"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"new-branch",
|
||||
"refactor"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"env": {
|
||||
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "git new-branch refactor"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"new-branch",
|
||||
"feature",
|
||||
"--upstream",
|
||||
"refactor"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"env": {
|
||||
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "git new-branch feature"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"rebase",
|
||||
"origin/master"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "my repo rebase"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"bundle",
|
||||
"create",
|
||||
"[START_DIR]/all.bundle",
|
||||
"--all"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"infra_step": true,
|
||||
"name": "git bundle"
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue