Skip to content

Commit

Permalink
Further adjustment related to build-info.json (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jul 2, 2019
1 parent 1828618 commit 17c8e80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ ! -e ./temp/github-milestones.json ]; then
fi

# write build info to build-info.json
./build/build-info.sh > ./build/build-info.json
npm run build-info

GIT_BRANCH=$(([ ! -z "$TRAVIS_BRANCH" ] && echo $TRAVIS_BRANCH) || git rev-parse --abbrev-ref HEAD)
GIT_COMMIT_SHORT=$(git rev-parse --verify --short HEAD)
Expand Down
5 changes: 2 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
.SUFFIXES: .md .html .pdf

# tested with Pandoc 2.2.1 and Pandoc 1.16 (on travis)
ROOT_DIR=$(CURDIR)/..
BUILD_INFO=$(CURDIR)/build-info.yaml
BUILD_INFO_JSON=$(ROOT_DIR)/build/build-info.json
BUILD_INFO_JSON=$(CURDIR)/../build/build-info.json
OPTIONS=--toc --standalone $(BUILD_INFO)

all: $(BUILD_INFO)
Expand All @@ -19,7 +18,7 @@ $(BUILD_INFO): $(BUILD_INFO_JSON)
echo '...' >> $@

$(BUILD_INFO_JSON):
cd $(ROOT_DIR) && $(ROOT_DIR)/build/build-info.sh > $@
npm run build-info

%.html: %.md
pandoc $(OPTIONS) -o $@ config.yaml $< --template $(CURDIR)/templates/user-manual.html
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint-staged": "lint-staged",
"styleguide": "vue-styleguidist server",
"styleguide:build": "vue-styleguidist build",
"build-info": "./build/build-info.sh > ./build/build-info.json",
"user-manual": "make -BC docs",
"release": "./bin/release.sh",
"kos-types": "wget http://api.dante.gbv.de/voc/top?uri=http://w3id.org/nkos/nkostype -O config/kos-types.json"
Expand All @@ -32,7 +33,9 @@
]
},
"gitHooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"post-commit": "build-info",
"post-receive": "build-info"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.16",
Expand Down

0 comments on commit 17c8e80

Please sign in to comment.