feat(analytics): add analytics on deploy script (#32)
This commit is contained in:
committed by
Benedikt Rötsch
parent
85d5e0faed
commit
146c01643b
13
bin/vendor/deploy.sh
vendored
Executable file
13
bin/vendor/deploy.sh
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
analytics_file="../bin/vendor/analytics.html"
|
||||
layout_file="$(dirname $0)/../../views/layout.pug"
|
||||
|
||||
# Replace analytics script in layout
|
||||
distro=`uname`
|
||||
if [[ $distro != 'Linux' ]]; then
|
||||
sed -i '' 's,'"<!--ANALYTICS-->,include $analytics_file"',g' "$layout_file"
|
||||
else # If running on macOS, the sed command has different syntax
|
||||
sed -i 's,'"<!--ANALYTICS-->,include $analytics_file"',g' "$layout_file"
|
||||
fi
|
||||
Reference in New Issue
Block a user