This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 693
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
Showing
1,463 changed files
with
34,801 additions
and
13,565 deletions.
There are no files selected for viewing
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,4 @@ | ||
#!/bin/bash | ||
|
||
export VERSION_TAG="$(python -c 'import fbt_options; print(fbt_options.DIST_SUFFIX, end="")')" | ||
echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV |
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,65 @@ | ||
#!/usr/bin/env python | ||
import nextcloud_client | ||
import datetime as dt | ||
import requests | ||
import json | ||
import os | ||
|
||
dev_share = os.environ["NC_HOST"] + "s/sGHsQB94a9x5CRs/download?path=/&files={files}" | ||
|
||
if __name__ == "__main__": | ||
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f: | ||
event = json.load(f) | ||
|
||
client = nextcloud_client.Client(os.environ["NC_HOST"]) | ||
client.login(os.environ["NC_USER"], os.environ["NC_PASS"]) | ||
|
||
for file in ( | ||
os.environ["ARTIFACT_TGZ"], | ||
os.environ["ARTIFACT_SDK"], | ||
): | ||
path = f"XFW-Dev/{file}" | ||
# try: | ||
# client.delete(path) | ||
# except Exception: | ||
# pass | ||
client.put_file(path, file) | ||
|
||
requests.post( | ||
os.environ["BUILD_WEBHOOK"], | ||
headers={"Accept": "application/json", "Content-Type": "application/json"}, | ||
json={ | ||
"content": None, | ||
"embeds": [ | ||
{ | ||
"title": "Devbuild infos:", | ||
"description": "", | ||
"url": "", | ||
"color": 16734443, | ||
"fields": [ | ||
{ | ||
"name": "Changes since last commit:", | ||
"value": f"[Compare {event['before'][:7]} to {event['after'][:7]}]({event['compare']})" | ||
}, | ||
{ | ||
"name": "Changes since last release:", | ||
"value": f"[Compare release to {event['after'][:7]}]({event['compare'].rsplit('/', 1)[0] + '/main...' + event['after']})" | ||
}, | ||
{ | ||
"name": "Firmware download:", | ||
"value": f"- [Download SDK for development]({dev_share.format(files=os.environ['ARTIFACT_SDK'])})\n- [Download Firmware TGZ]({dev_share.format(files=os.environ['ARTIFACT_TGZ'])})" | ||
} | ||
], | ||
"author": { | ||
"name": "Build Succeeded!", | ||
"icon_url": "https://cdn.discordapp.com/emojis/1080005692485795930.png" | ||
}, | ||
"footer": { | ||
"text": "Build go brrrr", | ||
"icon_url": "https://cdn.discordapp.com/emojis/1059798228725403719.png" | ||
}, | ||
"timestamp": dt.datetime.utcnow().isoformat() | ||
} | ||
], | ||
}, | ||
) |
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
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
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
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,4 +1,13 @@ | ||
#!/bin/bash | ||
|
||
export VERSION_TAG="$(python -c 'import fbt_options; print(fbt_options.DIST_SUFFIX)')" | ||
export VERSION_TAG="$(python -c ''' | ||
import datetime as dt | ||
import json | ||
import os | ||
with open(os.environ["GITHUB_EVENT_PATH"], "r") as f: | ||
event = json.load(f) | ||
version = int(event["pull_request"]["title"].removeprefix("V").removesuffix(" Release").removesuffix(" Hotfix")) | ||
date = dt.datetime.now().strftime("%d%m%Y") | ||
print(f"XFW-{version:04}_{date}", end="") | ||
''')" | ||
echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV |
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
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
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
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
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
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
Oops, something went wrong.