Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Language code as supported by Sphinx:
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
LANGUAGE ?= pt_BR

# Branch used in the project and in CPython
BRANCH := 3.11

############################
# Environment variables for 'merge' target
############################
#
# Version(s) that still receive(s) bug fixes, not only security-related fixes.
# Versions in this variable will have their translation replaced with changes
# in currently active version being translated. These will have pomerge's
# --overwrite flag set.
BUGFIXBRANCH ?= 3.10

# Version(s) that are considered security fixes or EOL. Let's make them more
# stable, with more predictable state. These versions will not have translated
# strings replaced with translations update. These will have pomerge's
# --no-overwrite flag set.
OLDERBRANCHES ?= 3.9 3.8 3.7 3.6 2.7
#
############################


############################
# Environment variables for 'build' target
############################
#
# If set to -W, warnings will be considered as errors.
# Set to "" keep warnings as is.
SPHINXERRORHANDLING := "-W"
#
############################

###########################
# Environment variables for 'tx-install' target
###########################
#
# Specific Transifex CLI Client version to install.
# If unset, latest version will be used.
TX_CLI_VERSION ?= '1.6.7'

# Install directory of TX_CLI_DIR. Consider using a directory already
# in the PATH environment variable because install script will add this
# directory to PATH in your ~/.bashrc.
TX_CLI_DIR ?= $(shell realpath ~/.local/bin)

############################
# Paths and URLs
############################
#
PYTHON ?= $(shell which python3)
CPYTHON_DIR := cpython
LOCALE_DIR := Doc/locales
LOGS_DIR := logs
VENV_DIR := .venv
#
#######
38 changes: 38 additions & 0 deletions .github/prepmsg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# Prepare message for Telegram notification
set -ex

die() { echo "$0: error: $*" >&2; exit 1; }

[ $# -ne 2 ] && die "Expected 1 input and 1 output files, got $#"
[ ! -f "$1" ] && die "Input file $1 not found, skipping."
[ -z "${GITHUB_REPOSITORY}" ] && die "GITHUB_REPOSITORY is empty."
[ -z "${GITHUB_RUN_ID}" ] && die "GITHUB_RUN_ID is empty."
[ -z "${GITHUB_JOB}" ] && die "GITHUB_JOB is empty."

URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"

input="$1"
output="$2"

touch aux
if [[ "${GITHUB_JOB}" == "build" ]]; then
grep 'cpython/Doc/.*WARNING:' "$input" | \
sed 's|.*/cpython/Doc/||' | \
uniq | \
sed 's|^|```\n|;s|$|\n```\n|' \
> aux
elif [[ "${GITHUB_JOB}" == "lint" ]]; then
grep -P '^.*\.po:\d+:\s+.*\(.*\)$' "$input" | \
sort -u | \
sed 's|^|```\n|;s|$|\n```\n|' \
> aux
else
die "Unexpected job name ${GITHUB_JOB}"
fi

[[ $(cat aux) == "" ]] && die "Unexpected empty output message."

echo "❌ *${GITHUB_JOB}* (ID [${GITHUB_RUN_ID}]($URL)):" > "$output";
{ echo ""; cat aux; echo ""; } >> "$output"
rm aux
95 changes: 0 additions & 95 deletions .github/workflows/build.yml

This file was deleted.

Loading