forked from Cog-Creators/Red-DiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'V3/develop' into mutes-add-timeouts
- Loading branch information
Showing
692 changed files
with
67,728 additions
and
58,998 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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Publish Release | |
on: | ||
push: | ||
tags: | ||
- "*" | ||
- "3.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
release_information: | ||
|
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,35 +1,45 @@ | ||
import os | ||
import re | ||
import shutil | ||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
|
||
|
||
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)") | ||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"] | ||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements" | ||
os.chdir(REQUIREMENTS_FOLDER) | ||
|
||
|
||
def pip_compile(name: str) -> None: | ||
def pip_compile(version: str, name: str) -> None: | ||
stem = f"{sys.platform}-{version}-{name}" | ||
if EXCLUDE_STEM_RE.fullmatch(stem): | ||
return | ||
|
||
executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",) | ||
subprocess.check_call( | ||
( | ||
sys.executable, | ||
*executable, | ||
"-m", | ||
"piptools", | ||
"compile", | ||
"--upgrade", | ||
"--resolver=backtracking", | ||
"--verbose", | ||
f"{name}.in", | ||
"--output-file", | ||
f"{sys.platform}-{name}.txt", | ||
f"{stem}.txt", | ||
) | ||
) | ||
|
||
|
||
pip_compile("base") | ||
shutil.copyfile(f"{sys.platform}-base.txt", "base.txt") | ||
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"): | ||
pip_compile(file.stem) | ||
for minor in range(8, 11 + 1): | ||
version = f"3.{minor}" | ||
pip_compile(version, "base") | ||
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt") | ||
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"): | ||
pip_compile(version, file.stem) | ||
|
||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp: | ||
fp.write(f"sys_platform={sys.platform}\n") |
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.