Skip to content

Commit

Permalink
Add macOS support to generate a version report
Browse files Browse the repository at this point in the history
  • Loading branch information
sbkok committed Jan 13, 2024
1 parent bccc75b commit a35eb28
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,32 @@ update_makefile: report_makefile_version
report_makefile_version:
@echo "Makefile: v$(MAKEFILE_VERSION) $$(shasum --algorithm 256 Makefile)"

report_versions: report_makefile_version
report_versions: .venv report_makefile_version
@echo "$(CLR_YELLOW)*** Beginning of ADF Version Report ***$(CLR_END)"
@echo "ADF Source version: $(SRC_VERSION)"
@echo "ADF $$(cat src/template.yml | grep SemanticVersion | xargs)"
@echo ""
@echo "Hardware platform: $$(uname --hardware-platform || echo 'n/a')"
@echo "Kernel name: $$(uname --kernel-name || echo 'n/a')"
@echo "Kernel release: $$(uname --kernel-release || echo 'n/a')"
@( \
uname --hardware-platform &> /dev/null && ( \
echo "Hardware platform: $$(uname --hardware-platform 2> /dev/null || echo 'n/a')" && \
echo "Kernel name: $$(uname --kernel-name 2> /dev/null || echo 'n/a')" && \
echo "Kernel release: $$(uname --kernel-release 2> /dev/null || echo 'n/a')" \
) || ( \
echo "Hardware platform: $$(uname -m 2> /dev/null || echo 'n/a')" && \
echo "Kernel name: $$(uname -s 2> /dev/null || echo 'n/a')" && \
echo "Kernel release: $$(uname -r 2> /dev/null || echo 'n/a')" \
) || exit 0; \
)
@echo ""
@test -e /etc/os-release && echo "OS Release:" && cat /etc/os-release
@test -e /etc/os-release && echo "OS Release:" && cat /etc/os-release || exit 0
@echo ""
@echo "Disk:"
@df -h $$PWD || echo 'N/A'
@df -h $$PWD 2> /dev/null || echo 'N/A'
@echo ""
@echo "Dependencies:"
@echo "docker: $$(docker --version || echo 'n/a')"
@echo "git: $$(git --version || echo 'n/a')"
@echo "make: $$(make --version || echo 'n/a')"
@echo "docker: $$(docker --version 2> /dev/null || echo 'n/a')"
@echo "git: $$(git --version 2> /dev/null || echo 'n/a')"
@echo "make: $$(make --version 2> /dev/null || echo 'n/a')"
@( \
. .venv/bin/activate; \
pip --version; \
Expand Down

0 comments on commit a35eb28

Please sign in to comment.