-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from rgbkrk/breakup-release
Breakup release script, fix release script for Linux
- Loading branch information
Showing
2 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# | ||
# Helper function to do replace; this should work across operating systems | ||
# | ||
|
||
function update { | ||
TMP_FILE=`mktemp $1` | ||
sed -e "$2" $3 > $TMP_FILE | ||
chmod 0644 $TMP_FILE | ||
mv -f $TMP_FILE $3 | ||
} | ||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
source "${SCRIPT_DIR}/lib.sh" | ||
|
||
NEW_VERSION=${1:-} | ||
REMOTE="release" | ||
REMOTE_URL="[email protected]:rackspace/rack.git" | ||
DOCS_INDEX_FILE="docs/index.rst" | ||
DOCS_CONFIGURATION_FILE="docs/configuration.rst" | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
|
||
# BRANCH | ||
get_branch | ||
|
||
echo "Releasing new version: ${NEW_VERSION}" | ||
|
||
|
@@ -78,17 +71,7 @@ if [ -n "$SYNC_STATUS" ]; then | |
exit 5 | ||
fi | ||
|
||
# | ||
# Update the docs index paths | ||
# | ||
|
||
update ./index.rst-version "s#rackcdn\.com/[0-9a-zA-Z.-]*/#rackcdn\.com/$NEW_VERSION/#g" $DOCS_INDEX_FILE | ||
|
||
# | ||
# Update the docs configuration paths | ||
# | ||
|
||
update ./configuration.rst-version "s#rackcdn\.com/[0-9a-zA-Z.-]*/#rackcdn\.com/$NEW_VERSION/#g" $DOCS_CONFIGURATION_FILE | ||
update_docs "${NEW_VERSION}" | ||
|
||
# | ||
# Commit and push the code changes | ||
|