From 78573e7fefae49b59c800b38a53923f665f29ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lipski?= Date: Mon, 17 Apr 2023 16:42:48 +0200 Subject: [PATCH] Pin Homebrew version for `ci/homebrew/ci-deploy.sh` (#894) --- ci/checks/prohibit-strings-with-backslash-continuation.sh | 2 +- ci/homebrew/ci-deploy.sh | 7 ++++++- ci/tox/.env-sample | 2 +- ci/tox/docker-compose.yml | 2 +- docs/man/git-machete.1 | 2 +- docs/source/cli_help/github.rst | 2 +- git_machete/generated_docs.py | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ci/checks/prohibit-strings-with-backslash-continuation.sh b/ci/checks/prohibit-strings-with-backslash-continuation.sh index 2286eec5a..d34dd952c 100755 --- a/ci/checks/prohibit-strings-with-backslash-continuation.sh +++ b/ci/checks/prohibit-strings-with-backslash-continuation.sh @@ -2,7 +2,7 @@ set -e -o pipefail -u -if git grep -n "^[^']*'[^s][^']*\\\\$" || git grep -n '^[^"]*"[^"]*\\$'; then +if git grep -n "^[^']*'[^s][^']*\\\\$" -- '*.py' || git grep -n '^[^"]*"[^"]*\\$' -- '*.py'; then echo 'The above lines apparently contains a backslash continuation within the string.' echo 'This might lead to unwanted whitespace making its way into strings, see https://github.com/VirtusLab/git-machete/issues/784' echo "Change into '...' \\ or \"...\" \\ style of continuation (the string must be closed within the containing line)." diff --git a/ci/homebrew/ci-deploy.sh b/ci/homebrew/ci-deploy.sh index 7ba2d32ec..94bce7896 100644 --- a/ci/homebrew/ci-deploy.sh +++ b/ci/homebrew/ci-deploy.sh @@ -2,10 +2,15 @@ set -e -o pipefail -u -x -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" < /dev/null +HOMEBREW_VERSION=4.0.13 + +NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +# https://stackoverflow.com/questions/54912857/how-do-i-install-old-version-of-homebrew-itself-not-the-formula +(cd /home/linuxbrew/.linuxbrew/Homebrew; git checkout $HOMEBREW_VERSION) ## The two lines below are added to avoid -> Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/circleci/.bash_profile eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +brew --version if [[ ${1-} == "--dry-run" || ${CIRCLE_BRANCH-} != "master" ]]; then do_push=false diff --git a/ci/tox/.env-sample b/ci/tox/.env-sample index adf642ea1..5ae740fd4 100644 --- a/ci/tox/.env-sample +++ b/ci/tox/.env-sample @@ -4,6 +4,6 @@ PYTHON_VERSION=3.8 # Vars for `docker-compose run` BUILD_SPHINX_HTML=false -CHECK_DOCS_UP_TO_DATE=false CHECK_COVERAGE=false +CHECK_DOCS_UP_TO_DATE=false CHECK_PEP8=false diff --git a/ci/tox/docker-compose.yml b/ci/tox/docker-compose.yml index c83e182b4..462287b58 100644 --- a/ci/tox/docker-compose.yml +++ b/ci/tox/docker-compose.yml @@ -10,8 +10,8 @@ services: - python_version=${PYTHON_VERSION:-0.0.0} environment: - BUILD_SPHINX_HTML=${BUILD_SPHINX_HTML:-false} - - CHECK_DOCS_UP_TO_DATE=${CHECK_DOCS_UP_TO_DATE:-false} - CHECK_COVERAGE=${CHECK_COVERAGE:-false} + - CHECK_DOCS_UP_TO_DATE=${CHECK_DOCS_UP_TO_DATE:-false} - CHECK_PEP8=${CHECK_PEP8:-false} volumes: # Host path is relative to current directory, not build-context diff --git a/docs/man/git-machete.1 b/docs/man/git-machete.1 index 26609391c..d699182b6 100644 --- a/docs/man/git-machete.1 +++ b/docs/man/git-machete.1 @@ -1078,7 +1078,7 @@ If \fB\&.git/info/reviewers\fP file is present, its contents (one GitHub login p Creates the new PR as a draft. .UNINDENT .TP -.B \fBretarget\-pr [\-b|\-\-branch= | \-\-ignore\-if\-missing]\fP: +.B \fBretarget\-pr [\-b|\-\-branch=] [\-\-ignore\-if\-missing]\fP: Sets the base of the current (or specified) branch\(aqs PR to upstream (parent) branch, as seen by git machete (see \fBgit machete show up\fP). .sp \fBOptions:\fP diff --git a/docs/source/cli_help/github.rst b/docs/source/cli_help/github.rst index 96643454f..5285135df 100644 --- a/docs/source/cli_help/github.rst +++ b/docs/source/cli_help/github.rst @@ -57,7 +57,7 @@ Creates, checks out and manages GitHub PRs while keeping them reflected in branc --draft Creates the new PR as a draft. -``retarget-pr [-b|--branch= | --ignore-if-missing]``: +``retarget-pr [-b|--branch=] [--ignore-if-missing]``: Sets the base of the current (or specified) branch's PR to upstream (parent) branch, as seen by git machete (see ``git machete show up``). **Options:** diff --git a/git_machete/generated_docs.py b/git_machete/generated_docs.py index f92ac1c0b..66f115a35 100644 --- a/git_machete/generated_docs.py +++ b/git_machete/generated_docs.py @@ -606,7 +606,7 @@ --draft Creates the new PR as a draft. - `retarget-pr [-b|--branch= | --ignore-if-missing]`: + `retarget-pr [-b|--branch=] [--ignore-if-missing]`: Sets the base of the current (or specified) branch's PR to upstream (parent) branch, as seen by git machete (see `git machete show up`).