Commit 1c3b3c6c authored by George Cushen's avatar George Cushen
Browse files

chore: remove old update script

parent 38f17bd2
#!/usr/bin/env bash
# Source Themes Academic: Theme updater
# Checks for available updates and then asks to install any updates.
# Command: bash ./
# Check for prerequisites.
if [ ! -d .git ]; then
echo "ERROR: This tool is for Git repositories only."
exit 1;
function view_update () {
echo -e "Checking for updates...\n"
cd themes/academic
git fetch
git log --pretty=oneline --abbrev-commit --decorate HEAD..origin/master
cd ../../
# Function to update Academic
function do_update () {
# Apply any updates
git submodule update --remote --merge
# - Update Netlify.toml with required Hugo version
if [ -f ./netlify.toml ]; then
# Postfix '.0' to Hugo min_version as sadly it doesn't map to a precise semantic version.
version=$(sed -n 's/^min_version = //p' themes/academic/theme.toml | tr -d '"')
echo "Set Netlify Hugo version to v${version}"
sed -i.bak -e "s/HUGO_VERSION = .*/HUGO_VERSION = \"$version\"/g" ./netlify.toml && rm -f ./netlify.toml.bak
echo "View the release notes at:"
echo "If there are breaking changes, the config and/or front matter of content" \
"may need upgrading by following the steps in the release notes."
# Display currently installed version (although could be between versions if updated to master rather than tag)
version=$(sed -n 's/^version = "//p' themes/academic/data/academic.toml)
echo -e "Source Themes Academic v$version\n"
# Display available updates
# Apply any updates
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment