Browse Source

simplified deliver docs

master
Daniel Huebleitner 5 years ago
parent
commit
a0d21c1e1c
2 changed files with 7 additions and 21 deletions
  1. 6
    20
      .drone.yml
  2. 1
    1
      package-lock.json

+ 6
- 20
.drone.yml View File

40
   commands:
40
   commands:
41
   - npm run test
41
   - npm run test
42
 
42
 
43
-- name: rebuild documentation
43
+- name: build docs
44
   image: node:12
44
   image: node:12
45
   commands:
45
   commands:
46
-  - rm -rf docs
47
   - npm run docs
46
   - npm run docs
48
   when:
47
   when:
49
     event:
48
     event:
60
     event:
59
     event:
61
       - tag
60
       - tag
62
 
61
 
63
-- name: deploy documentation
62
+- name: deliver docs
64
   image: node:12
63
   image: node:12
65
   commands:
64
   commands:
66
   - echo ${DRONE_BUILD_CREATED}
65
   - echo ${DRONE_BUILD_CREATED}
67
-  - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
68
-  - git config --global user.name "${DRONE_COMMIT_AUTHOR}"
69
-  - echo "clone ${DRONE_REPO_NAME}"; git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git
70
-  - cd ${DRONE_REPO_NAME}
71
-  - git reset HEAD --hard
72
-  - echo "remove files in ${DRONE_REPO_NAME}"; rm -rf ./*
73
-  - echo "copy docs to ${DRONE_REPO_NAME}"; cp -r ../docs/* .
74
-  - ls
75
-  - rm ./README.md
76
-  - head -n -2 ../README.md > ./README.md
77
-  - echo "## Version" >> ./README.md
78
-  - echo "${DRONE_TAG}" >> ./README.md
79
-  - echo "" >> ./README.md
80
-  - sed -i -e 1,4d ./globals.md
81
-  - cat globals.md >> ./README.md
82
-  - echo "add files in ${DRONE_REPO_NAME}"; git add -A
83
-  - git commit --allow-empty -m "Drone tagged as ${DRONE_TAG}"
66
+  - git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git && cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .
67
+  - sed -i '$ d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
68
+  - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
69
+  - git commit --all --allow-empty --message "drone tag: ${DRONE_TAG}" --author "${DRONE_COMMIT_AUTHOR} <${DRONE_COMMIT_AUTHOR_EMAIL}>"
84
   - git push --force origin master
70
   - git push --force origin master
85
   environment:
71
   environment:
86
     GIT_USER:
72
     GIT_USER:

+ 1
- 1
package-lock.json View File

1
 {
1
 {
2
   "name": "rpclibrary",
2
   "name": "rpclibrary",
3
-  "version": "1.2.5",
3
+  "version": "1.3.1",
4
   "lockfileVersion": 1,
4
   "lockfileVersion": 1,
5
   "requires": true,
5
   "requires": true,
6
   "dependencies": {
6
   "dependencies": {

Loading…
Cancel
Save