Skip to content

Commit ac22164

Browse files
pairs coding, renamed to generated, error handling on cp
1 parent 3a79846 commit ac22164

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

.dockerignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
**/node_modules/**
2+
**/generated/**

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
**/node_modules/**
2-
**/target/**
2+
**/generated/**

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ deploy:
3232
keep_history: true
3333
on:
3434
branch: master
35-
local_dir: ./target/docs
35+
local_dir: ./generated

demos/hello-world/generate-docs.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
set -e
1818

19-
rm -rf target/docs
20-
mkdir -p target/docs/
21-
echo "<html><body>Hello World</body></html>" > target/docs/index.html
19+
rm -rf ./generated/docs
20+
mkdir -p ./generated/docs
21+
echo "<html><body>Hello World</body></html>" > ./generated/docs/index.html

demos/hello-world/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"lint": "npx eslint -c ../../.eslintrc-node.yml .",
88
"deploy" : "npx apigeetool deployproxy -d passthrough-v1 -o $APIGEE_ORG -e $APIGEE_ENV -u $APIGEE_USER -p $APIGEE_PASS -n 'passthrough-v1' -V",
9-
"docs": "echo 'hello' > docs.html",
9+
"docs": "sh generate-docs.sh",
1010
"test": "echo 'running tests...'"
1111
},
1212
"dependencies": {

run-pipeline.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and # limitations under the License.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
1516

1617
set -e
1718
set -x
1819

1920
REPORT_FAIL=
2021
DIR="${1:-$PWD}"
21-
mkdir -p target/docs/demos
22-
mkdir -p target/docs/labs
23-
mkdir -p target/docs/tools
22+
23+
rm -rf ./generated
24+
mkdir -p ./generated/demos
25+
mkdir -p ./generated/labs
26+
mkdir -p ./generated/tools
2427

2528
echo "Running under "$DIR
2629

@@ -52,21 +55,21 @@ else
5255
do
5356
echo "Running pipeline on /demos/"$D
5457
(cd ./demos/$D && ./pipeline.sh) || REPORT_FAIL=$REPORT_FAIL$D" "
55-
cp -r ./demos/$D/target/docs ./target/docs/demos/$D
58+
cp -r ./demos/$D/generated/docs ./generated/demos/$D || true
5659
done
5760

5861
for D in `ls $DIR/labs`
5962
do
6063
echo "Running pipeline on /labs/"$D
6164
(cd ./labs/$D && ./pipeline.sh) || REPORT_FAIL=$REPORT_FAIL$D" "
62-
cp -r ./labs/$D/target/docs ./target/docs/labs/$D
65+
cp -r ./labs/$D/generated/docs ./generated/labs/$D || true
6366
done
6467

6568
for D in `ls $DIR/tools`
6669
do
6770
echo "Running pipeline on /tools/"$D
6871
(cd ./tools/$D && ./pipeline.sh) || REPORT_FAIL=$REPORT_FAIL$D" "
69-
cp -r ./tools/$D/target/docs ./target/docs/tools/$D
72+
cp -r ./tools/$D/generated/docs ./generated/tools/$D || true
7073
done
7174
fi
7275

0 commit comments

Comments
 (0)