Skip to content

Commit f4051ab

Browse files
redianthusXhmikosR
authored andcommitted
Clean shell scripts (#25704)
1 parent 6d7d91e commit f4051ab

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

build/ship.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,62 +9,62 @@
99

1010
red=$'\e[1;31m'
1111
green=$'\e[1;32m'
12-
blue=$'\e[1;34m'
12+
#blue=$'\e[1;34m'
1313
magenta=$'\e[1;35m'
14-
cyan=$'\e[1;36m'
14+
#cyan=$'\e[1;36m'
1515
end=$'\e[0m'
1616

1717
# Get current version from package.json
1818
current_version=$(node -p "require('./package.json').version")
1919

2020
if [[ $# -lt 1 ]]; then
21-
printf "\n${red}⚠️ Shipping aborted. You must specify a version.\n${end}"
21+
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" $red $end
2222
exit 1
2323
fi
2424

2525
# Pulling latest changes, just to be sure
26-
printf "\n${magenta}=======================================================${end}"
27-
printf "\n${magenta}Pulling latest changes...${end}"
28-
printf "\n${magenta}=======================================================\n\n${end}"
26+
printf "\n%s=======================================================%s" $magenta $end
27+
printf "\n%sPulling latest changes...%s" $magenta $end
28+
printf "\n%s=======================================================\n\n%s" $magenta $end
2929
git pull origin v4-dev
3030

3131
# Update version number
32-
printf "\n${magenta}=======================================================${end}"
33-
printf "\n${magenta}Updating version number...${end}"
34-
printf "\n${magenta}=======================================================\n${end}"
35-
npm run release-version $current_version $1
32+
printf "\n%s=======================================================%s" $magenta $end
33+
printf "\n%sUpdating version number...%s" $magenta $end
34+
printf "\n%s=======================================================\n%s" $magenta $end
35+
npm run release-version "$current_version" "$1"
3636

3737
# Compile latest CSS and JS
38-
printf "\n${magenta}=======================================================${end}"
39-
printf "\n${magenta}Compile latest CSS and JS...${end}"
40-
printf "\n${magenta}=======================================================\n${end}"
38+
printf "\n%s=======================================================%s" $magenta $end
39+
printf "\n%sCompile latest CSS and JS...%s" $magenta $end
40+
printf "\n%s=======================================================\n%s" $magenta $end
4141
npm run dist
4242

4343
# Generate the SRI hashes
44-
printf "\n${magenta}=======================================================${end}"
45-
printf "\n${magenta}Generate the SRI hashes...${end}"
46-
printf "\n${magenta}=======================================================\n${end}"
44+
printf "\n%s=======================================================%s" $magenta $end
45+
printf "\n%sGenerate the SRI hashes...%s" $magenta $end
46+
printf "\n%s=======================================================\n%s" $magenta $end
4747
npm run release-sri
4848

4949
# Compress the dist files
50-
printf "\n${magenta}=======================================================${end}"
51-
printf "\n${magenta}Compressing the dist files...${end}"
52-
printf "\n${magenta}=======================================================\n${end}"
50+
printf "\n%s=======================================================%s" $magenta $end
51+
printf "\n%sCompressing the dist files...%s" $magenta $end
52+
printf "\n%s=======================================================\n%s" $magenta $end
5353
npm run release-zip
5454

5555
# Compile the docs
56-
printf "\n${magenta}=======================================================${end}"
57-
printf "\n${magenta}Compile hosted documentation...${end}"
58-
printf "\n${magenta}=======================================================\n${end}"
56+
printf "\n%s=======================================================%s" $magenta $end
57+
printf "\n%sCompile hosted documentation...%s" $magenta $end
58+
printf "\n%s=======================================================\n%s" $magenta $end
5959
npm run docs-github
6060

6161
# Copy the contents of the built docs site over to `bs-docs` repo
62-
printf "\n${magenta}=======================================================${end}"
63-
printf "\n${magenta}Copy it over...${end}"
64-
printf "\n${magenta}=======================================================\n${end}"
62+
printf "\n%s=======================================================%s" $magenta $end
63+
printf "\n%sCopy it over...%s" $magenta $end
64+
printf "\n%s=======================================================\n%s" $magenta $end
6565
cp -rf _gh_pages/. ../bs-docs/
6666
printf "\nDone!\n"
6767

68-
printf "\n${green}=======================================================${end}"
69-
printf "\n${green}Success, $1 is ready to review and publish.${end}"
70-
printf "\n${green}=======================================================\n\n${end}"
68+
printf "\n%s=======================================================%s" $green $end
69+
printf "\n%sSuccess, $1 is ready to review and publish.%s" $green $end
70+
printf "\n%s=======================================================\n\n%s" $green $end

build/upload-preview.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml
66
bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}"
77

8-
openssl aes-256-cbc -K $encrypted_2b749c8e6327_key -iv $encrypted_2b749c8e6327_iv -in build/gcp-key.json.enc -out build/gcp-key.json -d
8+
openssl aes-256-cbc -K "${encrypted_2b749c8e6327_key:?}" -iv "${encrypted_2b749c8e6327_iv:?}" -in build/gcp-key.json.enc -out build/gcp-key.json -d
99
gcloud auth activate-service-account "$GCP_SERVICE_ACCOUNT" --key-file build/gcp-key.json &> /dev/null || (echo 'GCP login failed!'; exit 1)
1010

1111
echo "Uploading to http://preview.twbsapps.com/c/${TRAVIS_COMMIT} ..."

0 commit comments

Comments
 (0)