project Websites / videos.bentasker.co.uk avatar

Websites / videos.bentasker.co.uk: 022b2f6e




Updated README and created a bash script to handle building releases

Updated README and created a bash script to handle building releases

Commit 022b2f6e.

Authored 2019-12-15T11:08:40.000+00:00 by B Tasker in project Websites / videos.bentasker.co.uk

+51 lines -0 lines

Changes

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
# @@ -62,6 +62,25 @@ If it cannot identify from the filename extension, then `video/mp4` will be assu
# As of [CDN-13](https://jiralist.bentasker.co.uk/browse/CDN-13.html) media files are cached in a dedicated cache zone on the edge, and will be kept in cache for a year (assuming they aren't LRU'd out first).
#
#
# +----
# +
# +### Release
# +
# +All embeds use a minified copy of the codebase by default, so the various scripts need to be minified in order for them to actually be used. The `nodejs` script `uglifyjs` is used for this purpose. In order to install:
# +
# + sudo apt-get install node-uglify
# +
# +To create the release files we do
# +
# + ./do_release.sh [version number]
# +
# +e.g.
# +
# + ./do_release.sh 0.15
# +
# +This will create the minifed files which should then be uploaded to the prod server.
# +
# +
# ----
#
# ### Copyright
#
diff --git a/do_release.sh b/do_release.sh
--- a/do_release.sh
+++ b/do_release.sh
# @@ -0,0 +1,32 @@
# +#!/bin/bash
# +
# +version_num=$1
# +
# +if [ "$version_num" == "" ]
# +then
# + echo "Usage: $0 version_number"
# + exit 1
# +fi
# +
# +echo "Will create files for release v$version_num."
# +echo "Press enter to continue"
# +read blah
# +
# +
# +# Check uglifyjs is present
# +echo "foo" | uglifyjs > /dev/null
# +
# +if [ ! "$?" == "0" ]
# +then
# + echo "Uglifyjs doesn't seem to be working, do you need to do 'sudo apt-get install node-uglify'?"
# + exit 1
# +fi
# +
# +# Otherwise, do the minification
# +cd resources/embed/
# +uglifyjs embed.js > embed.min.js
# +cp embed.min.js versions/embed.$version_num.min.js
# +
# +echo "Release complete, please check git status, commit and then upload the release"
# +
# +
#