Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cxMiguelSilva committed Sep 22, 2022
1 parent b9240d1 commit ee68fec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/scripts/update_versions/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def checkVersion(name, apiUrl, currentVersion):

if request_version != currentVersion:
# print version is up to date and return empty string
# print("\t" + name + "\tfrom " +
# currentVersion + " to " + request_version)
print("\t" + name + "\tfrom " +
currentVersion + " to " + request_version)
return request_version
else:
# print version is up to date and return empty string
# print("\t" + name + "\talready in latest version: " + currentVersion)
print("\t" + name + "\talready in latest version: " + currentVersion)
return ""

else:
Expand All @@ -39,7 +39,7 @@ def checkVersion(name, apiUrl, currentVersion):
# get version_numbers_to_check json object
versions_to_check = data['version_numbers_to_check']

# print("Checking versions:")
print("Checking versions:")

for i in versions_to_check:
# check if any version is outdated
Expand All @@ -53,4 +53,4 @@ def checkVersion(name, apiUrl, currentVersion):
f = open('assets/libraries/common.json', "w")
json.dump(data, f, indent=2)
f.close()
print("Packages Updated")
print("Versions Updated")
16 changes: 9 additions & 7 deletions .github/workflows/update_software_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Run test update_versions script
id: updatever
- name: Run update_versions script
run: |
pip3 install -r .github/scripts/statistics/requirements.txt
pip3 install -r .github/scripts/update_versions/requirements.txt
python3 .github/scripts/update_versions/update.py
output= "test"
echo "$output"
echo "::set-output name=status::$output"
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v11.1
id: verify-changed-files
with:
files: |
*.json
- name: Create pull request
if: "contains(steps.updatever.outputs.status, 'Packages Updated')"
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: peter-evans/create-pull-request@v4
with:
title: "bump: updating software versions"
Expand Down
2 changes: 1 addition & 1 deletion assets/libraries/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@
{
"name": "python",
"apiUrl": "https://endoflife.date/api/python.json",
"version": "3.10.0"
"version": "3.10.7"
},
{
"name": "php",
Expand Down

0 comments on commit ee68fec

Please sign in to comment.