Skip to content

Commit

Permalink
[ci skip] Autoupdate version when releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Oct 18, 2017
1 parent f020c73 commit d893d6a
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 11 deletions.
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const closure = require('google-closure-compiler').gulp();
const minimalDocument = require('./util/minimalDocument.js');
const dom5 = require('dom5');
const parse5 = require('parse5');
const replace = require('gulp-replace');

const DIST_DIR = 'dist';
const BUNDLED_DIR = path.join(DIST_DIR, 'bundled');
Expand Down Expand Up @@ -264,4 +265,10 @@ gulp.task('generate-externs', ['clean'], () => {
return genClosure().then((declarations) => {
fs.writeFileSync('externs/closure-types.js', `${header}${declarations}`);
});
});

gulp.task('update-version', () => {
gulp.src('lib/utils/boot.html')
.pipe(replace(/(window.Polymer.version = )'\d+\.\d+\.\d+'/, `$1'${require('./package.json').version}'`))
.pipe(gulp.dest('lib/utils'));
});
62 changes: 53 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"gulp-babel": "^6.1.2",
"gulp-eslint": "^3.0.1",
"gulp-if": "^2.0.1",
"gulp-replace": "^0.6.1",
"gulp-size": "^2.1.0",
"gulp-vulcanize": "^6.0.1",
"lazypipe": "^1.0.1",
Expand All @@ -33,7 +34,8 @@
"scripts": {
"build": "gulp",
"test": "npm run lint && wct",
"lint": "gulp lint"
"lint": "gulp lint",
"version": "gulp update-version"
},
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions util/gen-changelog.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash
#
# @license
# Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
# This code may only be used under the BSD style license found at http:polymer.github.io/LICENSE.txt
# The complete set of authors may be found at http:polymer.github.io/AUTHORS.txt
# The complete set of contributors may be found at http:polymer.github.io/CONTRIBUTORS.txt
# Code distributed by Google as part of the polymer project is also
# subject to an additional IP rights grant found at http:polymer.github.io/PATENTS.txt
#

PRETTY="- %s ([commit](https://github.com/Polymer/polymer/commit/%h))%n"
start="$1"
Expand Down
1 change: 0 additions & 1 deletion util/minimalDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* subject to an additional IP rights grant found at http:polymer.github.io/PATENTS.txt
*/

// jshint node: true
'use strict';

const dom5 = require('dom5');
Expand Down

0 comments on commit d893d6a

Please sign in to comment.