Skip to content

Commit 3279689

Browse files
committed
Revamp Makefile
1 parent 483d812 commit 3279689

File tree

17 files changed

+4125
-3113
lines changed

17 files changed

+4125
-3113
lines changed

.env

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Language code as supported by Sphinx:
2+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
3+
LANGUAGE ?= pt_BR
4+
5+
# Branch used in the project and in CPython
6+
BRANCH := 3.11
7+
8+
############################
9+
# Environment variables for 'merge' target
10+
############################
11+
#
12+
# Version(s) that still receive(s) bug fixes, not only security-related fixes.
13+
# Versions in this variable will have their translation replaced with changes
14+
# in currently active version being translated. These will have pomerge's
15+
# --overwrite flag set.
16+
BUGFIXBRANCH ?= 3.10
17+
18+
# Version(s) that are considered security fixes or EOL. Let's make them more
19+
# stable, with more predictable state. These versions will not have translated
20+
# strings replaced with translations update. These will have pomerge's
21+
# --no-overwrite flag set.
22+
OLDERBRANCHES ?= 3.9 3.8 3.7 3.6 2.7
23+
#
24+
############################
25+
26+
27+
############################
28+
# Environment variables for 'build' target
29+
############################
30+
#
31+
# If set to -W, warnings will be considered as errors.
32+
# Set to "" keep warnings as is.
33+
SPHINXERRORHANDLING := "-W"
34+
#
35+
############################
36+
37+
###########################
38+
# Environment variables for 'tx-install' target
39+
###########################
40+
#
41+
# Specific Transifex CLI Client version to install.
42+
# If unset, latest version will be used.
43+
TX_CLI_VERSION ?= '1.6.7'
44+
45+
# Install directory of TX_CLI_DIR. Consider using a directory already
46+
# in the PATH environment variable because install script will add this
47+
# directory to PATH in your ~/.bashrc.
48+
TX_CLI_DIR ?= $(shell realpath ~/.local/bin)
49+
50+
############################
51+
# Paths and URLs
52+
############################
53+
#
54+
PYTHON ?= $(shell which python3)
55+
CPYTHON_DIR := cpython
56+
LOCALE_DIR := Doc/locales
57+
LOGS_DIR := logs
58+
VENV_DIR := .venv
59+
#
60+
#######

.github/prepmsg.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
# Prepare message for Telegram notification
3+
set -ex
4+
5+
die() { echo "$0: error: $*" >&2; exit 1; }
6+
7+
[ $# -ne 2 ] && die "Expected 1 input and 1 output files, got $#"
8+
[ ! -f "$1" ] && die "Input file $1 not found, skipping."
9+
[ -z "${GITHUB_REPOSITORY}" ] && die "GITHUB_REPOSITORY is empty."
10+
[ -z "${GITHUB_RUN_ID}" ] && die "GITHUB_RUN_ID is empty."
11+
[ -z "${GITHUB_JOB}" ] && die "GITHUB_JOB is empty."
12+
13+
URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
14+
15+
input="$1"
16+
output="$2"
17+
18+
touch aux
19+
if [[ "${GITHUB_JOB}" == "build" ]]; then
20+
grep 'cpython/Doc/.*WARNING:' "$input" | \
21+
sed 's|.*/cpython/Doc/||' | \
22+
uniq | \
23+
sed 's|^|```\n|;s|$|\n```\n|' \
24+
> aux
25+
elif [[ "${GITHUB_JOB}" == "lint" ]]; then
26+
grep -P '^.*\.po:\d+:\s+.*\(.*\)$' "$input" | \
27+
sort -u | \
28+
sed 's|^|```\n|;s|$|\n```\n|' \
29+
> aux
30+
else
31+
die "Unexpected job name ${GITHUB_JOB}"
32+
fi
33+
34+
[[ $(cat aux) == "" ]] && die "Unexpected empty output message."
35+
36+
echo "❌ *${GITHUB_JOB}* (ID [${GITHUB_RUN_ID}]($URL)):" > "$output";
37+
{ echo ""; cat aux; echo ""; } >> "$output"
38+
rm aux

.github/workflows/build.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)