File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 33
33
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
34
34
bash generation/hermetic_library_generation.sh \
35
35
--target_branch ${{ github.base_ref }} \
36
- --current_branch ${{ github.head_ref }} \
37
- --image_tag $(cat generation_config.yaml | yq .gapic_generator_version)
36
+ --current_branch ${{ github.head_ref }}
38
37
env :
39
38
GH_TOKEN : ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
Original file line number Diff line number Diff line change 21
21
# The parameters of this script is:
22
22
# 1. target_branch, the branch into which the pull request is merged.
23
23
# 2. current_branch, the branch with which the pull request is associated.
24
- # 3. image_tag, the tag of gcr.io/cloud-devrel-public-resources/java-library-generation.
25
24
# 3. [optional] generation_config, the path to the generation configuration,
26
25
# the default value is generation_config.yaml in the repository root.
27
26
while [[ $# -gt 0 ]]; do
@@ -35,10 +34,6 @@ case "${key}" in
35
34
current_branch=" $2 "
36
35
shift
37
36
;;
38
- --image_tag)
39
- image_tag=" $2 "
40
- shift
41
- ;;
42
37
--generation_config)
43
38
generation_config=" $2 "
44
39
shift
@@ -61,14 +56,9 @@ if [ -z "${current_branch}" ]; then
61
56
exit 1
62
57
fi
63
58
64
- if [ -z " ${image_tag} " ]; then
65
- echo " missing required argument --image_tag"
66
- exit 1
67
- fi
68
-
69
59
if [ -z " ${generation_config} " ]; then
70
60
generation_config=generation_config.yaml
71
- echo " Use default generation config: ${generation_config} "
61
+ echo " Using default generation config: ${generation_config} "
72
62
fi
73
63
74
64
workspace_name=" /workspace"
88
78
git show " ${target_branch} " :" ${generation_config} " > " ${baseline_generation_config} "
89
79
config_diff=$( diff " ${generation_config} " " ${baseline_generation_config} " || true)
90
80
81
+ # parse image tag from the generation configuration.
82
+ image_tag=$( grep " gapic_generator_version" " ${generation_config} " | cut -d ' :' -f 2 | xargs)
83
+
91
84
# run hermetic code generation docker image.
92
85
docker run \
93
86
--rm \
You can’t perform that action at this time.
0 commit comments