Index: icons/Makefile
==================================================================
--- icons/Makefile
+++ icons/Makefile
@@ -1,16 +1,16 @@
RIVET := /usr/lib64/rivet0.5.0/cgi-bin/rivet.cgi
ACTION_LIST := build tests
STATUS_LIST := pass fail
-PLATFORM_LIST := x86_64-linux x86_64-macos x86_64-freebsd
+PLATFORM_LIST := x86_64-linux x86_64-macos x86_64-freebsd arm-android
ICONS = $(shell for action in $(ACTION_LIST); do for status in $(STATUS_LIST); do for platform in $(PLATFORM_LIST); do echo "static/icon-$${action}-$${status}-$${platform}.svg"; done; done; done)
all: $(ICONS)
-static/%.svg: $(RIVET) status-icons.rvt $(shell find os -type f -name '*.svg')
+static/%.svg: $(RIVET) status-icons.rvt $(shell find os status action -type f -name '*.svg')
@if ! test -d static; then mkdir static; fi
QUERY_STRING='action=$(shell echo '$@' | cut -f 2 -d -)&status=$(shell echo '$@' | cut -f 3 -d -)&os=$(shell echo '$@' | cut -f 5 -d - | cut -f 1 -d .)' PATH_TRANSLATED='$(shell pwd)/status-icons.rvt' '$(RIVET)' ./status-icons.rvt | tail -n +5 > '$@'
static/%.png: static/%.svg
echo TODO Add support for making '$@' from '$^'
ADDED icons/action/build.svg
Index: icons/action/build.svg
==================================================================
--- /dev/null
+++ icons/action/build.svg
@@ -0,0 +1,67 @@
+
ADDED icons/action/tests.svg
Index: icons/action/tests.svg
==================================================================
--- /dev/null
+++ icons/action/tests.svg
@@ -0,0 +1,58 @@
+
ADDED icons/os/android.svg
Index: icons/os/android.svg
==================================================================
--- /dev/null
+++ icons/os/android.svg
@@ -0,0 +1,3 @@
+
Index: icons/status-icons.rvt
==================================================================
--- icons/status-icons.rvt
+++ icons/status-icons.rvt
@@ -1,8 +1,12 @@
proc iconfile {type name {checkUnknown true}} {
+ if {![regexp {^[a-z]*$} $name]} {
+ set name unknown
+ }
set file [file join [file dirname [info script]] $type "${name}.svg"]
+
if {![file exists $file]} {
if {$checkUnknown} {
tailcall iconfile $type unknown false
} else {
error "No icon available for type=$type name=$name"
@@ -24,10 +28,11 @@
proc textColorFromBackground {color} {
return "#fff"
}
+ set args(background_color) "#eee"
set args(action) [list "build"]
set args(status) [list "unknown"]
set args(os) [list "unknown"]
set action_color_default "#555"
set status_color_default "#4c1"
@@ -40,11 +45,11 @@
set mapping([list status_color unknown]) #9932CC
set errList [list]
load_response args
- foreach arg {action status status_color action_color os} {
+ foreach arg {action status status_color action_color background_color os} {
if {![info exists args($arg)]} {
continue
}
set args($arg) [lindex [set args($arg)] end]
@@ -62,11 +67,11 @@
if {![info exists args($arg)]} {
set args($arg) [set ${arg}_default]
}
}
- set timestamp "Tue, 24 Oct 2017 00:00:00 GMT"
+ set timestamp "Tue, 26 Oct 2017 00:00:00 GMT"
set etag [binary encode base64 [list $timestamp $args(action) $args(status) $args(action_color) $args(status_color) $args(os)]]
set actionTextColor [textColorFromBackground $args(action_color)]
set statusTextColor [textColorFromBackground $args(status_color)]
@@ -80,17 +85,22 @@
ADDED icons/status/fail.svg
Index: icons/status/fail.svg
==================================================================
--- /dev/null
+++ icons/status/fail.svg
@@ -0,0 +1,1 @@
+
ADDED icons/status/pass.svg
Index: icons/status/pass.svg
==================================================================
--- /dev/null
+++ icons/status/pass.svg
@@ -0,0 +1,1 @@
+