aboutsummaryrefslogtreecommitdiff
path: root/scripts/release.sh
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-05-11 15:09:39 -0700
committerMichael Ennen <mike.ennen@gmail.com>2016-05-11 21:06:26 -0700
commit954f983bc1516ba47d8961538e1ddba09d764794 (patch)
treed7f08198289491d96d43ed15e769dea6192ef038 /scripts/release.sh
parenta5a1768918286ef3ac4181b45b8b7eafb37767ac (diff)
downloadrneovim-954f983bc1516ba47d8961538e1ddba09d764794.tar.gz
rneovim-954f983bc1516ba47d8961538e1ddba09d764794.tar.bz2
rneovim-954f983bc1516ba47d8961538e1ddba09d764794.zip
Run shellcheck (shell scripting linter) on shell scripts.
There are a total of 5 shell scripts in the Neovim source tree. All but runtime\macros\less.sh had warnings/errors when run through Shellcheck (http://www.shellcheck.net/). This commit fixes all warnings/errors and also changes the shebang to "#!/bin/sh" when possible (this was not possible for vim-patch.sh because it uses many bashisms). The shellcheck errors that were fixed are: SC2068: Double quote array expansions to avoid re-splitting elements. SC2086: Double quote to prevent globbing and word splitting. SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate SC2155: Declare and assign separately to avoid masking return values.
Diffstat (limited to 'scripts/release.sh')
-rwxr-xr-xscripts/release.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/release.sh b/scripts/release.sh
index 514e5b380a..67738ccc96 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Performs steps to tag a release.
#
@@ -45,11 +45,11 @@ echo "Most recent tag: ${__LAST_TAG}"
echo "Release version: ${__VERSION}"
sed -i -r 's/(NVIM_VERSION_PRERELEASE) "-dev"/\1 ""/' CMakeLists.txt
echo "Building changelog since ${__LAST_TAG}..."
-__CHANGELOG="$(./scripts/git-log-pretty-since.sh $__LAST_TAG 'vim-patch:\S')"
+__CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')"
git add CMakeLists.txt
git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}"
-git tag -a v${__VERSION} -m "NVIM v${__VERSION}"
+git tag -a v"${__VERSION}" -m "NVIM v${__VERSION}"
sed -i -r 's/(NVIM_VERSION_PRERELEASE) ""/\1 "-dev"/' CMakeLists.txt
nvim -c '/NVIM_VERSION' -c 'echo "Update version numbers"' CMakeLists.txt