From 6e0a5e02931a5b35f548d3ec7a164806ea14e2b4 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 28 May 2013 15:58:14 -0400 Subject: [PATCH] Add notice of inclusion of third-party code (imported from commit 62d141e6ebd3368bd1cb3154d6903f9408f2b77c) --- tools/update-prod-static | 10 ++++++++++ zephyr/static/header.txt | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 zephyr/static/header.txt diff --git a/tools/update-prod-static b/tools/update-prod-static index 03e3745132..a7ea4ad5d5 100755 --- a/tools/update-prod-static +++ b/tools/update-prod-static @@ -4,6 +4,11 @@ cd "$(dirname "$0")"/.. +if ! which sponge >/dev/null; then + echo 'Install the moreutils package.' >&2 + exit 1 +fi + # Redirect output to a log file (most recent run only) exec >update-prod-static.log @@ -27,6 +32,11 @@ rm -rf prod-static/serve-new mkdir -p prod-static/serve-new cp -r prod-static/collected/{favicon.ico,robots.txt,html,images,third,min,audio} prod-static/serve-new/ +# Prepend the third-party code notice to JavaScript and CSS files. +for f in prod-static/serve-new/min/*.{js,css}; do + cat zephyr/static/header.txt $f | sponge $f +done + # Sync the new directory to the one nginx actually serves. # Hopefully this doesn't race too badly for clients loading # right as a deploy happens. diff --git a/zephyr/static/header.txt b/zephyr/static/header.txt new file mode 100644 index 0000000000..6d60428258 --- /dev/null +++ b/zephyr/static/header.txt @@ -0,0 +1,9 @@ +/* + Some of the software provided in this file may be offered under an open source + license. If some of the software in this file is offered under an open source + license, information about that license will appear in this file. + + All other software provided in this file is + Copyright (c) 2012-2013 Humbug, Inc. and is provided under the license + described in the Humbug Terms of Service: https://humbughq.com/terms + */