forked from wpilibsuite/vendor-json-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt M
committed
Nov 7, 2024
1 parent
f14f1c1
commit ebf5efc
Showing
5 changed files
with
168 additions
and
197 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: bump | ||
|
||
on: | ||
repository_dispatch: | ||
|
||
jobs: | ||
bump: | ||
if: github.event_name == 'repository_dispatch' && github.event.action == 'tag' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Information | ||
run: | | ||
echo "Version update for ${{ github.event.client_payload.package_version }}, job id ${{ github.event.client_payload.run_id }} requested" | ||
- uses: actions/checkout@v4 | ||
|
||
- run: git switch -C photonlib-${{ github.event.client_payload.package_version }} | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: photonlib-vendor-json | ||
github-token: ${{ secrets.GITHUB_TOKEN }} # token with actions:read permissions on target repo | ||
repository: mcm001/photonvision | ||
run-id: ${{ github.event.client_payload.run_id }} | ||
merge-multiple: true | ||
path: "2025" | ||
|
||
- run: find . | ||
- run: git status | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- run: python3 fixup_year.py 2025 ${{ github.event.client_payload.package_version }} | ||
|
||
# Cut a new PR | ||
# apparently we have to push or gh pr create gets upset | ||
- name: Commit and push | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
git add . | ||
git commit -m "Update vendor JSON to ${{ github.event.client_payload.package_version }}" | ||
git push --set-upstream origin photonlib-${{ github.event.client_payload.package_version }} -f | ||
- run: gh pr create --repo wpilibsuite/vendor-json-repo --title "Update PhotonLib to ${{ github.event.client_payload.package_version }}" --body "Automatic vendor JSON update from GitHub Actions" --base main --head photonvision:$(git branch --show-current) | ||
env: | ||
GH_TOKEN: ${{ secrets.VENDOR_JSON_REPO_PUSH_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,98 @@ | ||
[ | ||
{ | ||
"path": "2025/NavX-2025.1.1-beta-1.json", | ||
"name": "Studica", | ||
"version": "2025.1.1-beta-1", | ||
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", | ||
"description": "Libraries for NavX-MXP and NavX-Micro", | ||
"website": "https://pdocs.kauailabs.com/navx-mxp/software/roborio-libraries/" | ||
}, | ||
{ | ||
"path": "2025/Studica-2025.1.1-beta-2.json", | ||
"name": "Studica", | ||
"version": "2025.1.1-beta-2", | ||
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", | ||
"description": "Libraries for NavX and other Studica Products", | ||
"website": "https://github.com/Studica-Robotics/NavX" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-25.0.0-beta-1.json", | ||
"name": "CTRE-Phoenix (v6)", | ||
"version": "25.0.0-beta-1", | ||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", | ||
"description": "Libraries for Phoenix 6 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-25.0.0-beta-2.json", | ||
"name": "CTRE-Phoenix (v6)", | ||
"version": "25.0.0-beta-2", | ||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", | ||
"description": "Libraries for Phoenix 6 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-replay-25.0.0-beta-1.json", | ||
"name": "CTRE-Phoenix Replay (v6)", | ||
"version": "25.0.0-beta-1", | ||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", | ||
"description": "Libraries for Phoenix 6 devices with Hoot Replay", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-replay-25.0.0-beta-2.json", | ||
"name": "CTRE-Phoenix Replay (v6)", | ||
"version": "25.0.0-beta-2", | ||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", | ||
"description": "Libraries for Phoenix 6 devices with Hoot Replay", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix5-5.34.0-beta-1.json", | ||
"name": "CTRE-Phoenix (v5)", | ||
"version": "5.34.0-beta-1", | ||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537", | ||
"description": "Libraries for Phoenix 5 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix5-5.34.0-beta-2.json", | ||
"name": "CTRE-Phoenix (v5)", | ||
"version": "5.34.0-beta-2", | ||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537", | ||
"description": "Libraries for Phoenix 5 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/PathplannerLib-2025.0.0-beta-3.json", | ||
"name": "PathplannerLib", | ||
"version": "2025.0.0-beta-3", | ||
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", | ||
"description": "PathPlanner's powerful robot-side vendor library", | ||
"website": "https://pathplanner.dev/pathplannerlib.html" | ||
}, | ||
{ | ||
"path": "2025/PathplannerLib-2025.0.0-beta-3.1.json", | ||
"name": "PathplannerLib", | ||
"version": "2025.0.0-beta-3.1", | ||
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", | ||
"description": "PathPlanner's powerful robot-side vendor library", | ||
"website": "https://pathplanner.dev/pathplannerlib.html" | ||
}, | ||
{ | ||
"path": "2025/DogLog-2025.0.0.json", | ||
"name": "DogLog", | ||
"version": "2025.0.0", | ||
"uuid": "65592ce1-2251-4a31-8e4b-2df20dacebe4", | ||
"description": "Simpler logging for FRC", | ||
"website": "https://doglog.dev/" | ||
}, | ||
{ | ||
"path": "2025/REVLib-2025.0.0-beta-1.json", | ||
"name": "REVLib", | ||
"version": "2025.0.0-beta-1", | ||
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", | ||
"description": "Library for all REV devices including SPARK Flex, SPARK MAX, and Color Sensor V3", | ||
"website": "https://docs.revrobotics.com/brushless/revlib/revlib-overview" | ||
} | ||
{ | ||
"path": "2025/NavX-2025.1.1-beta-1.json", | ||
"name": "Studica", | ||
"version": "2025.1.1-beta-1", | ||
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", | ||
"description": "Libraries for NavX-MXP and NavX-Micro", | ||
"website": "https://pdocs.kauailabs.com/navx-mxp/software/roborio-libraries/" | ||
}, | ||
{ | ||
"path": "2025/Studica-2025.1.1-beta-2.json", | ||
"name": "Studica", | ||
"version": "2025.1.1-beta-2", | ||
"uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", | ||
"description": "Libraries for NavX and other Studica Products", | ||
"website": "https://github.com/Studica-Robotics/NavX" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-25.0.0-beta-1.json", | ||
"name": "CTRE-Phoenix (v6)", | ||
"version": "25.0.0-beta-1", | ||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", | ||
"description": "Libraries for Phoenix 6 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-25.0.0-beta-2.json", | ||
"name": "CTRE-Phoenix (v6)", | ||
"version": "25.0.0-beta-2", | ||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", | ||
"description": "Libraries for Phoenix 6 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-replay-25.0.0-beta-1.json", | ||
"name": "CTRE-Phoenix Replay (v6)", | ||
"version": "25.0.0-beta-1", | ||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", | ||
"description": "Libraries for Phoenix 6 devices with Hoot Replay", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix6-replay-25.0.0-beta-2.json", | ||
"name": "CTRE-Phoenix Replay (v6)", | ||
"version": "25.0.0-beta-2", | ||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", | ||
"description": "Libraries for Phoenix 6 devices with Hoot Replay", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix5-5.34.0-beta-1.json", | ||
"name": "CTRE-Phoenix (v5)", | ||
"version": "5.34.0-beta-1", | ||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537", | ||
"description": "Libraries for Phoenix 5 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/Phoenix5-5.34.0-beta-2.json", | ||
"name": "CTRE-Phoenix (v5)", | ||
"version": "5.34.0-beta-2", | ||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537", | ||
"description": "Libraries for Phoenix 5 devices", | ||
"website": "https://docs.ctr-electronics.com/" | ||
}, | ||
{ | ||
"path": "2025/PathplannerLib-2025.0.0-beta-3.json", | ||
"name": "PathplannerLib", | ||
"version": "2025.0.0-beta-3", | ||
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", | ||
"description": "PathPlanner's powerful robot-side vendor library", | ||
"website": "https://pathplanner.dev/pathplannerlib.html" | ||
}, | ||
{ | ||
"path": "2025/PathplannerLib-2025.0.0-beta-3.1.json", | ||
"name": "PathplannerLib", | ||
"version": "2025.0.0-beta-3.1", | ||
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", | ||
"description": "PathPlanner's powerful robot-side vendor library", | ||
"website": "https://pathplanner.dev/pathplannerlib.html" | ||
}, | ||
{ | ||
"path": "2025/DogLog-2025.0.0.json", | ||
"name": "DogLog", | ||
"version": "2025.0.0", | ||
"uuid": "65592ce1-2251-4a31-8e4b-2df20dacebe4", | ||
"description": "Simpler logging for FRC", | ||
"website": "https://doglog.dev/" | ||
}, | ||
{ | ||
"path": "2025/REVLib-2025.0.0-beta-1.json", | ||
"name": "REVLib", | ||
"version": "2025.0.0-beta-1", | ||
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", | ||
"description": "Library for all REV devices including SPARK Flex, SPARK MAX, and Color Sensor V3", | ||
"website": "https://docs.revrobotics.com/brushless/revlib/revlib-overview" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import sys | ||
import json | ||
|
||
if __name__ == "__main__": | ||
(_, year, version) = sys.argv | ||
print(f"Fixing up year {year} version {version}") | ||
|
||
with open(f"{year}.json", 'r') as f: | ||
current_year: list = json.load(f) | ||
current_year = [dep for dep in current_year if dep['version'] != version] | ||
print(current_year) | ||
current_year.append( | ||
{ | ||
"path": f"{year}/photonlib-{version}.json", | ||
"name": "PhotonLib", | ||
"version": version, | ||
"uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", | ||
"description": "PhotonVision is the free, fast, and easy-to-use vision processing solution for the FIRST Robotics Competition.", | ||
"website": "https://docs.photonvision.org/en/latest/docs/programming/photonlib/adding-vendordep.html" | ||
} | ||
) | ||
print(current_year) | ||
with open(f"{year}.json", 'w') as f: | ||
json.dump(current_year, f, indent=4) |