Sfoglia il codice sorgente

simplified deliver docs

master
Daniel Huebleitner 5 anni fa
parent
commit
a0d21c1e1c
2 ha cambiato i file con 7 aggiunte e 21 eliminazioni
  1. 6
    20
      .drone.yml
  2. 1
    1
      package-lock.json

+ 6
- 20
.drone.yml Vedi File

@@ -40,10 +40,9 @@ steps:
40 40
   commands:
41 41
   - npm run test
42 42
 
43
-- name: rebuild documentation
43
+- name: build docs
44 44
   image: node:12
45 45
   commands:
46
-  - rm -rf docs
47 46
   - npm run docs
48 47
   when:
49 48
     event:
@@ -60,27 +59,14 @@ steps:
60 59
     event:
61 60
       - tag
62 61
 
63
-- name: deploy documentation
62
+- name: deliver docs
64 63
   image: node:12
65 64
   commands:
66 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 70
   - git push --force origin master
85 71
   environment:
86 72
     GIT_USER:

+ 1
- 1
package-lock.json Vedi File

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

Loading…
Annulla
Salva