govuk_publishing_components 17.16.0 → 17.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +4 -0
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_hint.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- data/node_modules/lodash/README.md +2 -2
- data/node_modules/lodash/core.js +1 -1
- data/node_modules/lodash/core.min.js +1 -1
- data/node_modules/lodash/lodash.js +1 -1
- data/node_modules/lodash/lodash.min.js +1 -1
- data/node_modules/lodash/package.json +13 -13
- data/node_modules/standard/package.json +1 -1
- metadata +2 -4
- data/node_modules/lodash/org.js +0 -39
- data/node_modules/lodash/tag.js +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a73c8ab529cbf7f34bc87819610f1a34c4d1ab4219e031e69d2e6e6287d35d07
|
4
|
+
data.tar.gz: 8842d27cb7a805aded2e5635eed953f7c309fe3431d2ada9a42f44d779f0c29a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d75185e1696714bf58e31a5c2a96ebaec9ed6929edec3a38c9840e5d3621789c31b1ae4f7dea9cddafd3c198d13cfb09b78a18fd598befc9da0230ce54115c
|
7
|
+
data.tar.gz: 5792263743cd2d46dffa7243d682d703ae3e2f0bb3b6c9e597245716031a0220a6eddb24d92f34ac152dd28a8244705f33d262053a6f63dbffe80c88afdf6a0b
|
@@ -165,6 +165,10 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
165
165
|
// for all other, show generic error
|
166
166
|
if (typeof (error.responseJSON) !== 'undefined') {
|
167
167
|
error = typeof (error.responseJSON.message) === 'undefined' ? genericError : error.responseJSON.message
|
168
|
+
|
169
|
+
if (error === 'email survey sign up failure') {
|
170
|
+
error = genericError
|
171
|
+
}
|
168
172
|
} else {
|
169
173
|
error = genericError
|
170
174
|
}
|
@@ -14,5 +14,5 @@
|
|
14
14
|
<div class="gem-c-feedback <%= margin_top_class %>" data-module="feedback">
|
15
15
|
<%= render "govuk_publishing_components/components/feedback/yes_no_banner" %>
|
16
16
|
<%= render "govuk_publishing_components/components/feedback/problem_form", url_without_pii: url_without_pii %>
|
17
|
-
<%= render "govuk_publishing_components/components/feedback/survey_signup_form"%>
|
17
|
+
<%= render "govuk_publishing_components/components/feedback/survey_signup_form", path_without_pii: path_without_pii %>
|
18
18
|
</div>
|
@@ -17,6 +17,7 @@
|
|
17
17
|
<div class="gem-c-feedback__error-summary js-hidden js-errors" tabindex="-1"></div>
|
18
18
|
|
19
19
|
<input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
|
20
|
+
<input name="email_survey_signup[survey_source]" type="hidden" value="<%= path_without_pii %>">
|
20
21
|
|
21
22
|
<h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
|
22
23
|
<p id="survey_explanation" class="gem-c-feedback__form-paragraph">To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone.</p>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"/"
|
50
50
|
],
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#3523dd9fffc70cbd9f6f555f75863c33a709f49e",
|
52
|
-
"_shasum": "
|
52
|
+
"_shasum": "6b92563be16d251f4344b0504115d55cd173ce3c",
|
53
53
|
"_shrinkwrap": null,
|
54
54
|
"_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# lodash v4.17.
|
1
|
+
# lodash v4.17.15
|
2
2
|
|
3
3
|
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
|
4
4
|
|
@@ -28,7 +28,7 @@ var at = require('lodash/at');
|
|
28
28
|
var curryN = require('lodash/fp/curryN');
|
29
29
|
```
|
30
30
|
|
31
|
-
See the [package source](https://github.com/lodash/lodash/tree/4.17.
|
31
|
+
See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details.
|
32
32
|
|
33
33
|
**Note:**<br>
|
34
34
|
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
|
data/node_modules/lodash/core.js
CHANGED
@@ -25,5 +25,5 @@ return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return
|
|
25
25
|
return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
|
26
26
|
},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
|
27
27
|
var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
|
28
|
-
var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.
|
28
|
+
var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.15",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
|
29
29
|
})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
|
@@ -125,7 +125,7 @@ a=(i?a.replace(P,""):a).replace(Z,"$1").replace(q,"$1;"),a="function("+(t||"obj"
|
|
125
125
|
An.toInteger=Eu,An.toLength=ku,An.toLower=function(n){return Iu(n).toLowerCase()},An.toNumber=Su,An.toSafeInteger=function(n){return n?pt(Eu(n),-9007199254740991,9007199254740991):0===n?n:0},An.toString=Iu,An.toUpper=function(n){return Iu(n).toUpperCase()},An.trim=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(un,""):n&&(t=yr(t))?(n=M(n),r=M(t),t=I(n,r),r=R(n,r)+1,Or(n,t,r).join("")):n},An.trimEnd=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(fn,""):n&&(t=yr(t))?(n=M(n),t=R(n,M(t))+1,
|
126
126
|
Or(n,0,t).join("")):n},An.trimStart=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(on,""):n&&(t=yr(t))?(n=M(n),t=I(n,M(t)),Or(n,t).join("")):n},An.truncate=function(n,t){var r=30,e="...";if(du(t))var u="separator"in t?t.separator:u,r="length"in t?Eu(t.length):r,e="omission"in t?yr(t.omission):e;n=Iu(n);var i=n.length;if(Rn.test(n))var o=M(n),i=o.length;if(r>=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){
|
127
127
|
var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},An.unescape=function(n){return(n=Iu(n))&&G.test(n)?n.replace(V,tt):n},An.uniqueId=function(n){var t=++fi;return Iu(n)+t},An.upperCase=Tf,An.upperFirst=$f,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var n={};return mt(An,function(t,r){oi.call(An.prototype,r)||(n[r]=t)}),n}(),{chain:false
|
128
|
-
}),An.VERSION="4.17.
|
128
|
+
}),An.VERSION="4.17.15",r("bind bindKey curry curryRight partial partialRight".split(" "),function(n){An[n].placeholder=An}),r(["drop","take"],function(n,t){Un.prototype[n]=function(r){r=r===T?1:Ui(Eu(r),0);var e=this.__filtered__&&!t?new Un(this):this.clone();return e.__filtered__?e.__takeCount__=Ci(r,e.__takeCount__):e.__views__.push({size:Ci(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){
|
129
129
|
var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){
|
130
130
|
return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){
|
131
131
|
return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p;
|
@@ -15,19 +15,19 @@
|
|
15
15
|
],
|
16
16
|
"_from": "lodash@>=4.0.0 <5.0.0",
|
17
17
|
"_hasShrinkwrap": false,
|
18
|
-
"_id": "lodash@4.17.
|
18
|
+
"_id": "lodash@4.17.15",
|
19
19
|
"_inCache": true,
|
20
20
|
"_location": "/lodash",
|
21
|
-
"_nodeVersion": "
|
21
|
+
"_nodeVersion": "12.2.0",
|
22
22
|
"_npmOperationalInternal": {
|
23
23
|
"host": "s3://npm-registry-packages",
|
24
|
-
"tmp": "tmp/lodash_4.17.
|
24
|
+
"tmp": "tmp/lodash_4.17.15_1563503326395_0.45150483878351166"
|
25
25
|
},
|
26
26
|
"_npmUser": {
|
27
27
|
"name": "jdalton",
|
28
28
|
"email": "john.david.dalton@gmail.com"
|
29
29
|
},
|
30
|
-
"_npmVersion": "6.
|
30
|
+
"_npmVersion": "6.10.1",
|
31
31
|
"_phantomChildren": {},
|
32
32
|
"_requested": {
|
33
33
|
"raw": "lodash@^4.0.0",
|
@@ -48,8 +48,8 @@
|
|
48
48
|
"/standard/table",
|
49
49
|
"/table"
|
50
50
|
],
|
51
|
-
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.
|
52
|
-
"_shasum": "
|
51
|
+
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
52
|
+
"_shasum": "b447f6670a0455bbfeedd11392eff330ea097548",
|
53
53
|
"_shrinkwrap": null,
|
54
54
|
"_spec": "lodash@^4.0.0",
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ/node_modules/eslint",
|
@@ -75,12 +75,12 @@
|
|
75
75
|
"devDependencies": {},
|
76
76
|
"directories": {},
|
77
77
|
"dist": {
|
78
|
-
"integrity": "sha512-
|
79
|
-
"shasum": "
|
80
|
-
"tarball": "https://registry.npmjs.org/lodash/-/lodash-4.17.
|
81
|
-
"fileCount":
|
82
|
-
"unpackedSize":
|
83
|
-
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\
|
78
|
+
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
79
|
+
"shasum": "b447f6670a0455bbfeedd11392eff330ea097548",
|
80
|
+
"tarball": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
81
|
+
"fileCount": 1049,
|
82
|
+
"unpackedSize": 1401029,
|
83
|
+
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMSrfCRA9TVsSAnZWagAAwdsP/RhUWg82MeFBHu0zHeQd\nhslgH/+xAkHR3SGuT5q9t6qqkNsqgSl25RdtEJqqlV69Ni2W8y5YgNfrQTVq\ntcmjDoJejlU4qnNiUNP/R81Ph+bNKh0+DcCCo+2YKMEk5XVCNxTWxETyasYR\n0PNuRR6dbvhWij0AEL6Uk2VF0vI9T/hFje7NeNnNf9CLk+mfKtxydB62cTtZ\ntojexG52iH5w4Lk35gjyOgAoWCFSk09GRgOW3RmmiPU8Cg7gizcW/7ynimbV\nPXY/GpdZ4EcmZSb7F47TBl/Ymv4TE2+H8LEvdxdtFfsaCyu0i/9wyi34j6ja\nujYyWCiie2IkJYSONWc0UxIBtq6tjLrXanuhsL7caXZWyljvqLRPYcfWJVWQ\nheL1YGLBOWtZtM51h7uHfnz/3YViQxkT55z5eziAWFGKX/x8ByUO2LU+LGjv\nwzRb8fqi5l7Wz3BjNbDxLyA8X8FsSu2rzPogz9bHvqc5WYknpoPJp/aRUADz\nlLoO+fwQRA9PYKhTcLMDMJQ+NIxaA++6eJ8ZIokp5Qx9RvhIbr3pMgg13PbN\nuiV1LT6I2H7y9NC6yucgE4/siQmcRSi5y5XT3G1jx6SLOvTFa5d4Ae5CSk1L\nSUqRZ+/x8uDI7fr/DZP9gCUgKrhd/ATikrR2wloqOyv0x27KB1WzDsNie3am\nyCB9\r\n=KaV2\r\n-----END PGP SIGNATURE-----\r\n"
|
84
84
|
},
|
85
85
|
"homepage": "https://lodash.com/",
|
86
86
|
"icon": "https://lodash.com/icon.svg",
|
@@ -111,5 +111,5 @@
|
|
111
111
|
"scripts": {
|
112
112
|
"test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\""
|
113
113
|
},
|
114
|
-
"version": "4.17.
|
114
|
+
"version": "4.17.15"
|
115
115
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.
|
4
|
+
version: 17.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|
@@ -5300,7 +5300,6 @@ files:
|
|
5300
5300
|
- node_modules/lodash/omitBy.js
|
5301
5301
|
- node_modules/lodash/once.js
|
5302
5302
|
- node_modules/lodash/orderBy.js
|
5303
|
-
- node_modules/lodash/org.js
|
5304
5303
|
- node_modules/lodash/over.js
|
5305
5304
|
- node_modules/lodash/overArgs.js
|
5306
5305
|
- node_modules/lodash/overEvery.js
|
@@ -5369,7 +5368,6 @@ files:
|
|
5369
5368
|
- node_modules/lodash/subtract.js
|
5370
5369
|
- node_modules/lodash/sum.js
|
5371
5370
|
- node_modules/lodash/sumBy.js
|
5372
|
-
- node_modules/lodash/tag.js
|
5373
5371
|
- node_modules/lodash/tail.js
|
5374
5372
|
- node_modules/lodash/take.js
|
5375
5373
|
- node_modules/lodash/takeRight.js
|
data/node_modules/lodash/org.js
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var fs = require('fs-extra'),
|
4
|
-
path = require('path');
|
5
|
-
|
6
|
-
var _ = require('lodash'),
|
7
|
-
glob = require('glob'),
|
8
|
-
moment = require('moment'),
|
9
|
-
ncp = require('ncp').ncp;
|
10
|
-
|
11
|
-
var cwd = process.cwd();
|
12
|
-
|
13
|
-
var packages = _.transform(glob.sync(path.join(cwd, 'lodash.*')), function(result, pathname) {
|
14
|
-
var stat = fs.statSync(path.join(pathname, 'index.js'));
|
15
|
-
if (!moment(stat.mtime).isSame(stat.birthtime)) {
|
16
|
-
result[path.basename(pathname)] = require(path.join(pathname, 'package.json'));
|
17
|
-
}
|
18
|
-
}, {});
|
19
|
-
|
20
|
-
var grouped = _.groupBy(packages, 'version');
|
21
|
-
|
22
|
-
_.forOwn(grouped, function(packages, version) {
|
23
|
-
var pathname = path.join(cwd, version);
|
24
|
-
if (!fs.existsSync(pathname)) {
|
25
|
-
fs.ensureDirSync(pathname);
|
26
|
-
}
|
27
|
-
_.each(packages, function(pkg) {
|
28
|
-
var source = path.join(cwd, pkg.name),
|
29
|
-
destination = path.join(pathname, pkg.name);
|
30
|
-
|
31
|
-
ncp(source, destination, function (err) {
|
32
|
-
if (err) {
|
33
|
-
console.error(err);
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
// console.log('copied ' + pkg.name + ' to ' + path.join(version, pkg.name));
|
37
|
-
});
|
38
|
-
});
|
39
|
-
});
|
data/node_modules/lodash/tag.js
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var _ = require('lodash'),
|
4
|
-
childProcess = require('child_process'),
|
5
|
-
execSync = childProcess.execSync,
|
6
|
-
semver = require('semver'),
|
7
|
-
spawn = childProcess.spawn;
|
8
|
-
|
9
|
-
var branch = 'npm-packages';
|
10
|
-
|
11
|
-
var reLine = /^.*$/gm;
|
12
|
-
|
13
|
-
var output = execSync('git log ' + branch + ' --pretty=format:"%s | %h"').toString();
|
14
|
-
|
15
|
-
var pairs = _.map(output.match(reLine), function(value) {
|
16
|
-
var pair = _.map(_.trim(value, '"\'').split('|'), _.trim);
|
17
|
-
pair[0] = _.result(/\d+(?:\.\d+)*/.exec(pair[0]), 0, '');
|
18
|
-
return pair;
|
19
|
-
});
|
20
|
-
|
21
|
-
pairs = _.filter(pairs, '0');
|
22
|
-
|
23
|
-
pairs.sort(function(a, b) {
|
24
|
-
return semver.gt(a[0], b[0]) ? 1 : (semver.lt(a[0], b[0]) ? -1 : 0);
|
25
|
-
});
|
26
|
-
|
27
|
-
pairs = pairs.map(function(pair) {
|
28
|
-
var tag = pair[0] + (branch == 'master' ? '' : '-' + branch);
|
29
|
-
return [
|
30
|
-
//'git checkout ' + tag + ' && git commit --amend --no-edit --date "`date`"',
|
31
|
-
'git tag -f -a -m ' + tag + ' "' + tag + '" ' + pair[1],
|
32
|
-
'git push -f origin ' + tag
|
33
|
-
];
|
34
|
-
});
|
35
|
-
|
36
|
-
_.each(pairs, function(pair, index) {
|
37
|
-
_.each(pair, function(command) {
|
38
|
-
_.delay(function() {
|
39
|
-
console.log(command)
|
40
|
-
execSync(command);
|
41
|
-
}, 1000 * index);
|
42
|
-
});
|
43
|
-
});
|