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 618832a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,27 @@ report_versions: report_makefile_version
@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 618832a

Please sign in to comment.