Skip to content

Commit 4130541

Browse files
committed
build(netlify): fetch tags so the deployed About box shows a version
1 parent e78cd69 commit 4130541

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎netlify.toml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
VITE_SHOW_SAMPLE_DATA= "true"
1010

1111
[build]
12-
command = "sed -i \"s|DICOM_WEB_API_KEY|${DICOM_WEB_API_KEY}|g; s|DICOM_WEB_ADDRESS|${DICOM_WEB_ADDRESS}|g\" netlify.toml && npm run build"
12+
# The version shown in the About box comes from `git describe`, which needs tags
13+
# and enough history to count from them. Netlify clones neither by default.
14+
command = "{ git fetch --tags --unshallow || git fetch --tags; } 2>/dev/null; sed -i \"s|DICOM_WEB_API_KEY|${DICOM_WEB_API_KEY}|g; s|DICOM_WEB_ADDRESS|${DICOM_WEB_ADDRESS}|g\" netlify.toml && npm run build"
1315

1416
[dev]
1517
targetPort = 8080

0 commit comments

Comments
 (0)