forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-version-info
executable file
·71 lines (66 loc) · 1.92 KB
/
update-version-info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
# Generate the version-info.json file which provides basic information about the latest versions of Metabase available.
# This is used inside the Metabase application as a simple mechanism to be aware if an upgrade is available.
build() {
echo '{
"latest": {
"version": "v0.18.0",
"released": "2016-05-04T21:09:36.358Z",
"patch": false,
"highlights": [
"Notifications about available Metabase updates"
]
},
"older": [
{
"version": "v0.17.1",
"released": "2016-05-04T21:09:36.358Z",
"patch": true,
"highlights": [
""
]
},
{
"version": "v0.17.0",
"released": "2016-05-04T21:09:36.358Z",
"patch": false,
"highlights": [
"Tags + Search for Saved Questions",
"Calculated columns",
"Faster Syncing of Metadata",
"Lots of database driver improvements and bug fixes"
]
},
{
"version": "v0.16.1",
"released": "2016-05-04T21:09:36.358Z",
"patch": true,
"highlights": [
"Fixes for several time alignment issues (timezones)",
"Resolved problem with SQL Server db connections"
]
},
{
"version": "v0.16.0",
"released": "2016-05-04T21:09:36.358Z",
"patch": false,
"highlights": [
"Fullscreen (and fabulous) Dashboards",
"Say hello to Metabot in Slack"
]
}
]
}' > /tmp/version-info.json
}
upload() {
# send the current file to s3
aws s3 cp /tmp/version-info.json "s3://static.metabase.com/version-info.json"
}
publish() {
build && upload && rm /tmp/version-info.json 2> /dev/null
}
if [ "$1" ]; then
$1
else
publish
fi