Skip to content

Commit c37377c

Browse files
committed
Circle CI 2.0に移行
1 parent 1faf1f0 commit c37377c

File tree

4 files changed

+42
-19
lines changed

4 files changed

+42
-19
lines changed

Diff for: .circleci/config.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: /book
5+
docker:
6+
- image: vvakame/review
7+
steps:
8+
- checkout
9+
- run: git submodule init && git submodule update
10+
11+
- restore_cache:
12+
keys:
13+
- yarn-cache-{{ checksum "yarn.lock" }}
14+
- run: npm run global
15+
- run: yarn install
16+
- save_cache:
17+
key: yarn-cache-{{ checksum "yarn.lock" }}
18+
paths:
19+
- ~/.cache/yarn
20+
21+
- run: npm run pdf
22+
- store_artifacts:
23+
path: /book/articles/revised2-typescript-in-definitelyland.pdf
24+
destination: PDF data
25+
26+
- run: npm run epub
27+
- store_artifacts:
28+
path: /book/articles/revised2-typescript-in-definitelyland.epub
29+
destination: EPUB data
30+
31+
workflows:
32+
version: 2
33+
build_and_test:
34+
jobs:
35+
- build

Diff for: build-in-docker.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/bin/bash
1+
#!/bin/bash -eux
22

3-
# コマンド手打ちで作業したい時は以下の通り /book に pwd がマウントされます
4-
# docker run -i -t -v $(pwd):/book vvakame/review /bin/bash
5-
6-
docker run -t --rm -v $(pwd):/book vvakame/review /bin/bash -ci "cd /book && ./setup.sh && npm run pdf"
3+
docker run -t --rm \
4+
-v $(pwd):/book vvakame/review \
5+
/bin/bash -ci "cd /book && ./setup.sh && npm run pdf"

Diff for: circle.yml

-9
This file was deleted.

Diff for: setup.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#!/bin/bash
2-
3-
set -eux
1+
#!/bin/bash -eux
42

53
rm -rf node_modules
6-
yarn install
7-
4+
# --unsafe-perm はrootでの実行時(= docker環境)で必要 非root時の挙動に影響なし
5+
npm install --unsafe-perm
86
git submodule init && git submodule update

0 commit comments

Comments
 (0)