@@ -5,11 +5,25 @@ cd "${0%/*}"
5
5
6
6
setup_colors () {
7
7
if [[ -z " ${NO_COLOR-} " ]]; then
8
- NOFORMAT=' \033[0m' BOLD=' \033[1m'
9
- RED=' \033[0;31m' GREEN=' \033[0;32m' ORANGE=' \033[0;33m' BLUE=' \033[0;34m'
10
- PURPLE=' \033[0;35m' CYAN=' \033[0;36m' YELLOW=' \033[1;33m'
8
+ NOFORMAT=' \033[0m'
9
+ BOLD=' \033[1m'
10
+ RED=' \033[0;31m'
11
+ GREEN=' \033[0;32m'
12
+ ORANGE=' \033[0;33m'
13
+ BLUE=' \033[0;34m'
14
+ PURPLE=' \033[0;35m'
15
+ CYAN=' \033[0;36m'
16
+ YELLOW=' \033[1;33m'
11
17
else
12
- NOFORMAT=' ' BOLD=' ' RED=' ' GREEN=' ' ORANGE=' ' BLUE=' ' PURPLE=' ' CYAN=' ' YELLOW=' '
18
+ NOFORMAT=' '
19
+ BOLD=' '
20
+ RED=' '
21
+ GREEN=' '
22
+ ORANGE=' '
23
+ BLUE=' '
24
+ PURPLE=' '
25
+ CYAN=' '
26
+ YELLOW=' '
13
27
fi
14
28
}
15
29
@@ -41,22 +55,19 @@ declare -A TYPE_TITLES=(
41
55
[archive]=" Archive"
42
56
[closuremaps_sdkjs_opensource]=" SDKJS Closure Maps Opensource"
43
57
[closuremaps_sdkjs_commercial]=" SDKJS Closure Maps Commercial"
44
- [closuremaps_webapps_opensource]=" WEB-APPS Closure Maps Opensource "
45
- [closuremaps_webapps_commercial]=" WEB-APPS Closure Maps Commercial"
58
+ [closuremaps_webapps_opensource]=" WEB-APPS Closure Maps"
59
+ # [closuremaps_webapps_commercial]="WEB-APPS Closure Maps Commercial"
46
60
[generic]=" Portable"
47
61
[update]=" Update"
48
62
[inno]=" Inno Setup"
49
63
[advinst]=" Advanced Installer"
50
64
[x86_64]=" x86_64"
51
65
[v8]=" x86_64 V8"
52
66
[arm]=" arm64"
53
- [altlinux]=" ALT Linux"
54
67
[appimage]=" AppImage"
55
- [astra]=" Astra Linux Special Edition"
56
68
[debian]=" Debian / Ubuntu"
57
69
[flatpak]=" Flatpak"
58
70
[rhel]=" RHEL / CentOS"
59
- [rosa]=" ROSA"
60
71
[snap]=" Snapcraft"
61
72
[suse]=" SUSE Linux / OpenSUSE"
62
73
)
@@ -66,9 +77,6 @@ keys_t=${1:-keys.txt}
66
77
data_j=reports/data.json
67
78
desc_h=build.html
68
79
69
- rm -rfv reports $desc_h
70
- mkdir -p reports
71
-
72
80
msg " ${BOLD}${GREEN} PREPARE${NOFORMAT} "
73
81
74
82
echo COMPANY_NAME=$COMPANY_NAME
@@ -77,6 +85,10 @@ echo BUILD_VERSION=$BUILD_VERSION
77
85
echo BUILD_NUMBER=$BUILD_NUMBER
78
86
echo S3_BASE_URL=$S3_BASE_URL
79
87
echo S3_BUCKET=$S3_BUCKET
88
+
89
+ rm -rfv reports $desc_h
90
+ mkdir -p reports
91
+
80
92
[[ ! -f $keys_t ]] && exit 1
81
93
jq -n {} > $data_j
82
94
@@ -86,43 +98,52 @@ json_add() {
86
98
&& mv -f $data_j .tmp $data_j
87
99
}
88
100
89
- for product in core desktop builder server mobile; do
90
- if [[ $product == core ]] && grep -q -E " ^((windows|mac|linux)/core|closure-maps)/" $keys_t ; then
91
- (grep " ^windows/core/" $keys_t || :) | while read key; do
92
- json_add $product win archive $key
93
- done
94
- (grep " ^mac/core/" $keys_t || :) | while read key; do
95
- json_add $product mac archive $key
96
- done
97
- (grep " ^linux/core/" $keys_t || :) | while read key; do
98
- json_add $product linux archive $key
99
- done
100
- (grep " ^closure-maps/sdkjs/opensource/" $keys_t || :) | while read key; do
101
- json_add $product linux closuremaps_sdkjs_opensource $key
102
- done
103
- (grep " ^closure-maps/sdkjs/commercial/" $keys_t || :) | while read key; do
104
- json_add $product linux closuremaps_sdkjs_commercial $key
105
- done
106
- (grep " ^closure-maps/web-apps/opensource/" $keys_t || :) | while read key; do
107
- json_add $product linux closuremaps_webapps_opensource $key
108
- done
109
- (grep " ^closure-maps/web-apps/commercial/" $keys_t || :) | while read key; do
110
- json_add $product linux closuremaps_webapps_commercial $key
111
- done
112
- elif [[ $product == mobile ]]; then
113
- (grep " ^$product /android/" $keys_t || :) | while read key; do
114
- json_add $product android archive $key
115
- done
116
- else
117
- for platform in win mac linux; do
118
- for type in archive generic update inno advinst x86_64 v8 arm \
119
- altlinux appimage astra debian flatpak rhel rosa snap suse; do
120
- (grep " ^$product /$platform /$type /" $keys_t || :) | while read key; do
121
- json_add $product $platform $type $key
122
- done
101
+ (grep " ^archive/.*/core-win" $keys_t || :) | while read key; do
102
+ json_add core win archive $key
103
+ done
104
+ (grep " ^archive/.*/core-mac" $keys_t || :) | while read key; do
105
+ json_add core mac archive $key
106
+ done
107
+ (grep " ^archive/.*/core-linux" $keys_t || :) | while read key; do
108
+ json_add core linux archive $key
109
+ done
110
+
111
+ (grep " ^archive/.*/builder-win" $keys_t || :) | while read key; do
112
+ json_add builder win archive $key
113
+ done
114
+ (grep " ^archive/.*/builder-mac" $keys_t || :) | while read key; do
115
+ json_add builder mac archive $key
116
+ done
117
+ (grep " ^archive/.*/builder-linux" $keys_t || :) | while read key; do
118
+ json_add builder linux archive $key
119
+ done
120
+
121
+ (grep " ^closure-maps/sdkjs/opensource/" $keys_t || :) | while read key; do
122
+ json_add core linux closuremaps_sdkjs_opensource $key
123
+ done
124
+ (grep " ^closure-maps/sdkjs/commercial/" $keys_t || :) | while read key; do
125
+ json_add core linux closuremaps_sdkjs_commercial $key
126
+ done
127
+ (grep " ^closure-maps/web-apps/opensource/" $keys_t || :) | while read key; do
128
+ json_add core linux closuremaps_webapps_opensource $key
129
+ done
130
+ # (grep "^closure-maps/web-apps/commercial/" $keys_t || :) | while read key; do
131
+ # json_add core linux closuremaps_webapps_commercial $key
132
+ # done
133
+
134
+ (grep " ^mobile/android/" $keys_t || :) | while read key; do
135
+ json_add mobile android archive $key
136
+ done
137
+
138
+ for product in desktop builder server; do
139
+ for platform in win mac linux; do
140
+ for type in archive generic update inno advinst x86_64 v8 arm \
141
+ appimage debian flatpak rhel snap suse; do
142
+ (grep " ^$product /$platform /$type /" $keys_t || :) | while read key; do
143
+ json_add $product $platform $type $key
123
144
done
124
145
done
125
- fi
146
+ done
126
147
done
127
148
128
149
@@ -136,7 +157,7 @@ jq -r "keys_unsorted[]" $data_j | while read product; do
136
157
<html lang="en-US">
137
158
<head>
138
159
<title>$COMPANY_NAME ${PRODUCT_TITLES[$product]} - $BRANCH_NAME - $BUILD_NUMBER </title>
139
- <link rel="shortcut icon" sizes="16x16" href="$S3_BASE_URL /favicon.png " type="image/png ">
160
+ <link rel="shortcut icon" href="$S3_BASE_URL /favicon.ico " type="image/x-icon ">
140
161
<link rel="stylesheet" href="https://unpkg.com/@primer/css@21.0.7/dist/primer.css">
141
162
</head>
142
163
<body>
@@ -159,19 +180,21 @@ EOF
159
180
sha1=$( <<< $object jq -er ' .Metadata.sha1 // empty' || :)
160
181
md5=$( <<< $object jq -er ' .Metadata.md5 // empty' || :)
161
182
162
- echo " <div class=\" d-inline-flex width-full\" style=\" gap:8px\" >" >> $html
163
- echo " <span class=\" flex-1\" ><a href=\" $S3_BASE_URL /$key \" >${key##*/ } </a></span>" >> $html
164
- echo " <span class=\" color-fg-muted\" >$( LANG=C numfmt --to=iec-i $size ) B</span>" >> $html
165
- if [[ -n $sha256 ]]; then
166
- echo " <span class=\" tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\" $sha256 \" >SHA256</span>" >> $html
167
- fi
168
- if [[ -n $sha1 ]]; then
169
- echo " <span class=\" tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\" $sha1 \" >SHA1</span>" >> $html
170
- fi
171
- if [[ -n $md5 ]]; then
172
- echo " <span class=\" tooltipped tooltipped-nw tooltipped-no-delay\" aria-label=\" $md5 \" >MD5</span>" >> $html
183
+ if [[ -z $sha256 && -z $sha1 && -z $md5 ]]; then
184
+ echo " <p class=\" m-0\" >" >> $html
185
+ echo " <a href=\" $S3_BASE_URL /$key \" >${key##*/ } </a>" >> $html
186
+ echo " $( LANG=C numfmt --to=iec-i $size ) B" >> $html
187
+ echo " </p>" >> $html
188
+ else
189
+ echo " <details class=\" m-0\" >" >> $html
190
+ echo " <summary class=\" list-style-none\" >" >> $html
191
+ echo " <a href=\" $S3_BASE_URL /$key \" >${key##*/ } </a>" >> $html
192
+ echo " $( LANG=C numfmt --to=iec-i $size ) B" >> $html
193
+ echo " <div class=\" dropdown-caret\" ></div>" >> $html
194
+ echo " </summary>" >> $html
195
+ echo " <pre class=\" m-0\" >SHA256: $sha256 <br>SHA1: $sha1 <br>MD5: $md5 </pre>" >> $html
196
+ echo " </details>" >> $html
173
197
fi
174
- echo " </div>" >> $html
175
198
done
176
199
done
177
200
done
@@ -206,9 +229,7 @@ if ls reports/*.html 2> /dev/null; then
206
229
207
230
for product in core desktop builder server mobile; do
208
231
[[ -f reports/$product .html ]] || continue
209
- if [[ -f $desc_h ]]; then
210
- echo -n ' · ' >> $desc_h
211
- fi
232
+ [[ -f $desc_h ]] && echo -n ' · ' >> $desc_h
212
233
echo -n " <a href=\" $S3_BASE_URL /reports/$BRANCH_NAME /$BUILD_NUMBER /$product .html\" target=\" _blank\" >${product^} </a>" >> $desc_h
213
234
done
214
235
fi
0 commit comments