Compare commits
4 Commits
v2025.0625
...
v2025.0625
Author | SHA1 | Date | |
---|---|---|---|
f094d532cf | |||
fffa88482a | |||
54af706032 | |||
ef7470dcce |
@ -2,6 +2,15 @@
|
|||||||
set -uo pipefail # Remove -e to handle errors manually
|
set -uo pipefail # Remove -e to handle errors manually
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
|
||||||
|
docker builder prune -f
|
||||||
|
|
||||||
|
|
||||||
|
# Colors for output
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
# Arrays to track results
|
# Arrays to track results
|
||||||
declare -A BUILD_RESULTS
|
declare -A BUILD_RESULTS
|
||||||
declare -A TEST_RESULTS
|
declare -A TEST_RESULTS
|
||||||
@ -166,9 +175,36 @@ function print_summary() {
|
|||||||
local test_status="${TEST_RESULTS[$project]:-'-'}"
|
local test_status="${TEST_RESULTS[$project]:-'-'}"
|
||||||
local publish_status="${PUBLISH_RESULTS[$project]:-'-'}"
|
local publish_status="${PUBLISH_RESULTS[$project]:-'-'}"
|
||||||
|
|
||||||
printf "│ %-*s │ %-7s │ %-7s │ %-7s │\n" \
|
# Format status with proper spacing and colors for Unicode characters
|
||||||
|
local build_col test_col publish_col
|
||||||
|
|
||||||
|
# Format build status with colors
|
||||||
|
case "$build_status" in
|
||||||
|
"✓") build_col=$(printf " ${GREEN}✓${NC} ") ;;
|
||||||
|
"✗") build_col=$(printf " ${RED}✗${NC} ") ;;
|
||||||
|
"SKIP") build_col=$(printf " ${YELLOW}-${NC} ") ;;
|
||||||
|
*) build_col=" - " ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Format test status with colors
|
||||||
|
case "$test_status" in
|
||||||
|
"✓") test_col=$(printf " ${GREEN}✓${NC} ") ;;
|
||||||
|
"✗") test_col=$(printf " ${RED}✗${NC} ") ;;
|
||||||
|
"SKIP") test_col=$(printf " ${YELLOW}-${NC} ") ;;
|
||||||
|
*) test_col=" - " ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Format publish status with colors
|
||||||
|
case "$publish_status" in
|
||||||
|
"✓") publish_col=$(printf " ${GREEN}✓${NC} ") ;;
|
||||||
|
"✗") publish_col=$(printf " ${RED}✗${NC} ") ;;
|
||||||
|
"SKIP") publish_col=$(printf " ${YELLOW}-${NC} ") ;;
|
||||||
|
*) publish_col=" - " ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
printf "│ %-*s │%b│%b│%b│\n" \
|
||||||
$max_project_width "$project" \
|
$max_project_width "$project" \
|
||||||
"$build_status" "$test_status" "$publish_status"
|
"$build_col" "$test_col" "$publish_col"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Print bottom border
|
# Print bottom border
|
||||||
|
@ -17,12 +17,19 @@ Examples:
|
|||||||
dehydrate src/ output/ Creates _src.cpp and _src.hpp in output/
|
dehydrate src/ output/ Creates _src.cpp and _src.hpp in output/
|
||||||
dehydrate -u Updates dehydrate to the latest version
|
dehydrate -u Updates dehydrate to the latest version
|
||||||
dehydrate -v Shows version number
|
dehydrate -v Shows version number
|
||||||
|
dehydrate version Shows version number
|
||||||
)";
|
)";
|
||||||
|
|
||||||
Args parse_args(int argc, char* argv[]) {
|
Args parse_args(int argc, char* argv[]) {
|
||||||
Args args;
|
Args args;
|
||||||
int idx = 1;
|
int idx = 1;
|
||||||
|
|
||||||
|
// Check for "version" as first argument (no dash)
|
||||||
|
if (argc > 1 && std::string(argv[1]) == "version") {
|
||||||
|
args.version = true;
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse flags
|
// Parse flags
|
||||||
while (idx < argc && argv[idx][0] == '-') {
|
while (idx < argc && argv[idx][0] == '-') {
|
||||||
std::string flag = argv[idx];
|
std::string flag = argv[idx];
|
||||||
|
Reference in New Issue
Block a user