Skip to content

Commit 07f0767

Browse files
committed
test
1 parent 7b8db3d commit 07f0767

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
python--version: '3.x'
2727
- name: Check and Modify
2828
run: echo "NGINX_VERSION_TO_TEST=$(python bin/nginx_dependencies.py)" >> $GITHUB_ENV
29+
- name: Test
30+
run: echo $NGINX_VERSION_TO_TEST
2931
- name: Create Pull Request
3032
id: pr
3133
uses: peter-evans/[email protected]

bin/nginx_dependencies.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def if_version_supported(version):
77
return tuple(map(int, version.split('.'))) > tuple(map(int, LATEST_VERSION_SUPPORTED.split('.')))
88

99
def update_nginx_version(source_file, destination_file, new_version):
10-
with open(source_file, 'r') as file:
10+
with open(source_file) as file:
1111
file_content = file.read()
1212

1313
updated_content = file_content.replace("{NGINX_VERSION}", new_version)
@@ -25,14 +25,12 @@ def update_nginx_version(source_file, destination_file, new_version):
2525

2626
if get_nginx_release_versions.returncode != 0:
2727
print("Could not get nginx versions:", stderr.decode())
28-
exit()
29-
30-
31-
for line in stdout.decode().splitlines():
32-
version, link = line.split(' ', 1)
33-
34-
if if_version_supported(version):
35-
print("export NGINX_VERSION_TO_TEST="+version)
36-
update_nginx_version("base_config.yml", "config.yml", version)
37-
subprocess.run(["mv config.yml ../.circleci/config.yml"], shell=True, check=True)
38-
break
28+
else:
29+
for line in stdout.decode().splitlines():
30+
version, link = line.split(' ', 1)
31+
32+
if if_version_supported(version):
33+
print("export NGINX_VERSION_TO_TEST="+version)
34+
update_nginx_version("base_config.yml", "config.yml", version)
35+
subprocess.run(["mv config.yml ../.circleci/config.yml"], shell=True, check=True)
36+
break

0 commit comments

Comments
 (0)