|
9 | 9 |
|
10 | 10 | red=$'\e[1;31m' |
11 | 11 | green=$'\e[1;32m' |
12 | | -blue=$'\e[1;34m' |
| 12 | +#blue=$'\e[1;34m' |
13 | 13 | magenta=$'\e[1;35m' |
14 | | -cyan=$'\e[1;36m' |
| 14 | +#cyan=$'\e[1;36m' |
15 | 15 | end=$'\e[0m' |
16 | 16 |
|
17 | 17 | # Get current version from package.json |
18 | 18 | current_version=$(node -p "require('./package.json').version") |
19 | 19 |
|
20 | 20 | 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 |
22 | 22 | exit 1 |
23 | 23 | fi |
24 | 24 |
|
25 | 25 | # 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 |
29 | 29 | git pull origin v4-dev |
30 | 30 |
|
31 | 31 | # 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" |
36 | 36 |
|
37 | 37 | # 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 |
41 | 41 | npm run dist |
42 | 42 |
|
43 | 43 | # 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 |
47 | 47 | npm run release-sri |
48 | 48 |
|
49 | 49 | # 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 |
53 | 53 | npm run release-zip |
54 | 54 |
|
55 | 55 | # 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 |
59 | 59 | npm run docs-github |
60 | 60 |
|
61 | 61 | # 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 |
65 | 65 | cp -rf _gh_pages/. ../bs-docs/ |
66 | 66 | printf "\nDone!\n" |
67 | 67 |
|
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 |
0 commit comments