-
Notifications
You must be signed in to change notification settings - Fork 7
/
publish.sh
executable file
·75 lines (67 loc) · 1.66 KB
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# Last update:2015.01.02
#
# DEV ep_codepad publishing script.
#
# D250 Laboratories / D250.hu
# Author: István király
#
## file to work with
g='package.json'
## etherpad version
version="1.5.6"
NOW=$(date +%Y.%m.%d-%H:%M:%S)
echo $NOW
cv=`cat $g | grep "version" | sed 's/[^0-9.]*//g'`
nv=`echo $cv | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}'`
echo $cv" > "$nv
echo '{
"name": "ep_codepad",
"description": "Turn etherpad into a realtime collaborative development environment",
"keywords": [
"sourcecode",
"edit",
"javascript",
"html",
"css",
"php",
"bash",
"code",
"syntaxhighlight",
"jsHint",
"beautify",
"IDE"
],
"author": {
"name": "István Király",
"email": "[email protected]",
"homepage": "http://www.D250.hu"
},
"version": "'$nv'",
"dependencies": {
"js-beautify": ">=1.5.0",
"jshint": ">= 2.5.0",
"log4js": ">= 0.5.x",
"regexp-quote": "*",
"mime": ">= 1.2.11",
"bcrypt-nodejs": "*"
},
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "*"
},
"repository": {
"type": "git",
"url": "https://github.com/LaKing/ep_codepad"
},
"readmeFilename": "README.md",
"dist": {
"shasum": "a8f8e9afb5f219265ffb696ca5cf4cf9c1d778c8"
}
}' > $g
git add . -A
git commit -m $nv
git push -f
npm publish