Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of sporadic make error 141. #408

Merged
merged 15 commits into from
Jan 22, 2025
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ JPEEK = /opt/app/jpeek.jar
# Options for all Java processes
JAVA_OPTS=-Xmx128m

# defines rules and symbols for formatting numeric information
LC_NUMERIC=C

# Make all variables from this Makefile visible in all steps/*.sh
export

Expand Down
2 changes: 1 addition & 1 deletion help/check-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -e
set -o pipefail

make_version=$(make --version | head -n1 | cut -d' ' -f3)
make_version=$(make --version | awk 'NR==1 {print $3}')
make_version_int=$(echo "${make_version}" | cut -d'.' -f1)

if [ "${make_version_int}" -lt 4 ]; then
Expand Down
10 changes: 7 additions & 3 deletions metrics/aocih.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ age_in_hours=0
cd "$(dirname "${java_file}")"

if git status > /dev/null 2>&1; then
repo_first_commit=$(git log --reverse --format=%at | head -1)
file_first_commit=$(git log --diff-filter=A --format=%at -- "$java_file" | tail -1)
if [[ -n "$file_first_commit" ]]; then
repo_first_commit=$(git log --reverse --format=%at | head -n 1 || true)
file_first_commit=$(git log --diff-filter=A --format=%at -- "$java_file" | tail -n 1 || true)
if [[ -n "$repo_first_commit" && -n "$file_first_commit" ]]; then
age_in_seconds=$((file_first_commit - repo_first_commit))
age_in_hours=$((age_in_seconds / 3600))
else
echo "Warning: Unable to calculate commit age for $java_file" >&2
fi
else
echo "Error: Not a Git repository or unable to access it." >&2
fi

echo "AoCiH $age_in_hours Age of Class in Hours" > "$output"
2 changes: 1 addition & 1 deletion tests/steps/test-discover-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tex=${TARGET}/foo.tex
rm -f "${csv}"
msg=$("${LOCAL}/steps/discover-repos.rb" --dry --pause=0 --total=3 --page-size=1 --min-stars=100 --max-stars=1000 "--csv=${csv}" "--tex=${tex}")
echo "${msg}"
echo "${msg}" | grep "Completed querying for year 2024. Found 3 repositories so far."
echo "${msg}" | grep "Completed querying for year $(date +%Y). Found 3 repositories so far."
echo "${msg}" | grep "Found 3 total repositories in GitHub"
test -e "${csv}"
test -s "${tex}"
Expand Down
2 changes: 1 addition & 1 deletion tex/report.bib
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ @article{bieman1995cohesion

@misc{dohmke2023,
author = {Dohmke, Thomas},
howpublished = {\url{https://github.blog/2023-01-25-100-million-developers-and-counting/}},
howpublished = {\url{https://shorturl.at/oWGK4}},
note = {[Online; accessed 13-03-2024]},
title = {{100 Million Developers and Counting}},
year = {2023},
Expand Down
Loading