-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cut-release-release-branch-changes.sh
executable file
·61 lines (44 loc) · 1.15 KB
/
.cut-release-release-branch-changes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# <release-branch> is assumed to be something like "release-0.9.32"
set -e
if [ $# != 1 ]; then
echo "usage: $(basename "$0") <release-branch>" >&2
exit 1
fi
RELEASE_BRANCH=${1:-}
REPO_ROOT_DIR=$(repo-root-dir.sh)
# README.md -------------------------------------------------------------------
#
# badges
#
# requires.io
sed -i '' \
-e \
"s|?branch=master|?branch=${RELEASE_BRANCH}|g" \
"${REPO_ROOT_DIR}/README.md"
# CodeFactor
sed -i '' \
-e \
"s|/badge/master|/badge/${RELEASE_BRANCH}|g" \
"${REPO_ROOT_DIR}/README.md"
sed -i '' \
-e \
"s|/overview/master|/overview/${RELEASE_BRANCH}|g" \
"${REPO_ROOT_DIR}/README.md"
# CircleCI
sed -i '' \
-e \
"s|/tree/master|/tree/${RELEASE_BRANCH}|g" \
"${REPO_ROOT_DIR}/README.md"
# codecov
sed -i '' \
-e \
"s|/branch/master|/branch/${RELEASE_BRANCH}|g" \
"${REPO_ROOT_DIR}/README.md"
# don't need to do anything for docker images
# -----------------------------------------------------------------------------
rm -f "${REPO_ROOT_DIR}/README.rst"
build-readme-dot-rst.sh
rm -rf "${REPO_ROOT_DIR}/dist"
build-python-package.sh
exit 0