File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed
Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e
3-
2+ set -eo pipefail
43if [[ ! -z " $CODECHECKER_ACTION_DEBUG " ]]; then
54 set -x
65fi
Original file line number Diff line number Diff line change 33if [[ ! -z " $CODECHECKER_ACTION_DEBUG " ]]; then
44 set -x
55fi
6+ set -u
67
78echo " ::group::Installing LLVM"
89
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -o pipefail
23if [[ ! -z " $CODECHECKER_ACTION_DEBUG " ]]; then
34 set -x
45fi
56
6- echo " ::group::Installing CodeChecker from PyPI"
7+ echo " ::group::Installing CodeChecker $IN_VERSION from PyPI"
78if [[ " $IN_VERSION " == " master" ]]; then
89 # The default branch name "master" is offered as a convenient shortcut for
9- # fetching the latest release.
10- pip3 install codechecker
11- else
12- pip3 install codechecker==" $IN_VERSION "
10+ # fetching the latest release. Unfortunately, this might just be a release
11+ # candidate, which we do not wish to supply to automated production users
12+ # this eagerly...
13+
14+ # Hack to get pip list us which versions are available...
15+ # (thanks, http://stackoverflow.com/a/26664162)
16+ pip3 install codechecker==" You_cant_be_serious_mate" 2>&1 \
17+ | grep " ERROR: Could not find a version" \
18+ | sed ' s/^.*(from versions: \(.*\))/\1/' \
19+ | sed ' s/, /\n/g' \
20+ | grep -v ' rc\|a' \
21+ | sort -V \
22+ | tail -n 1 \
23+ >> " codechecker_latest_release.txt"
24+
25+ IN_VERSION=$( cat " codechecker_latest_release.txt" )
26+ echo " Selected CodeChecker version $IN_VERSION automatically."
27+ rm " codechecker_latest_release.txt"
1328fi
29+
30+ set -e
31+
32+ pip3 install codechecker==" $IN_VERSION "
33+
1434pip3 show codechecker
1535echo " ::endgroup::"
1636
You can’t perform that action at this time.
0 commit comments