Skip to content

Commit d604d59

Browse files
author
Kelly Churchill
committed
updating README and build task
1 parent d18761c commit d604d59

File tree

2 files changed

+11
-27
lines changed

2 files changed

+11
-27
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@ Build site
4848
```
4949
yarn build
5050
```
51+
52+
## Deploy to private cloud (staging environment)
53+
54+
You must be added to the private cloud to deploy to the IBMDesignOrg `front-end` space. The files in the `public` distribution folder are deployed so a build must be done prior to pushing.
55+
56+
```
57+
yarn build
58+
cf push -f manifest.internal.yml
59+
```
60+

tasks/build.sh

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ function print_help {
44
echo "Usage: ${0} [OPTIONS]"
55
echo ""
66
echo "OPTIONS:"
7-
echo " --env <environment> the environment for gatsby to target for builds"
87
echo " --help print this message and exit"
98
echo ""
109
}
@@ -27,10 +26,6 @@ root_path=$PWD
2726
# Parse our CLI arguments, most notably --env
2827
while [ "$1" != "" ]; do
2928
case $1 in
30-
"--env")
31-
shift
32-
BUILD_ENV=$1
33-
;;
3429
"--help")
3530
print_help
3631
exit 0
@@ -39,31 +34,10 @@ while [ "$1" != "" ]; do
3934
shift
4035
done
4136

42-
# We want to verify that --env was passed in and supplied a value.
43-
# If not, exit early and print our help instructions
44-
if [ "$BUILD_ENV" == "" ]
45-
then
46-
echo "--env flag is required for ${0} to run"
47-
print_help
48-
exit 1
49-
fi
50-
5137
# Remove the .cache directory to prevent any weirdness
5238
rm -rf .cache
5339

5440
# Generate build timestamp
5541
/bin/sh ./tasks/build-timestamp.sh
5642

57-
# Switch on the BUILD_ENV to target all of our supported build environments
58-
case ${BUILD_ENV} in
59-
"external")
60-
GATSBY_ENV=$BUILD_ENV $(yarn bin)/gatsby build --prefix-paths
61-
;;
62-
"internal")
63-
GATSBY_ENV=$BUILD_ENV $(yarn bin)/gatsby build --prefix-paths
64-
;;
65-
*)
66-
echo "The build environment \`${BUILD_ENV}\` is unsupported."
67-
exit 1
68-
;;
69-
esac
43+
$(yarn bin)/gatsby build --prefix-paths

0 commit comments

Comments
 (0)