forked from microsoftgraph/msgraph-sdk-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (25 loc) · 855 Bytes
/
gulpfile.js
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
const { series } = require("gulp");
const licenseStr = `/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
`;
const moduleHeader = `/**
* @module Version
*/
`;
const versionFile = `${licenseStr}
// THIS FILE IS AUTO GENERATED
// ANY CHANGES WILL BE LOST DURING BUILD
${moduleHeader}
export const PACKAGE_VERSION = "[VERSION]";
`;
function setVersion(cb) {
var pkg = require("./package.json");
var fs = require("fs");
fs.writeFileSync("src/Version.ts", versionFile.replace("[VERSION]", pkg.version));
cb();
}
exports.setVersion = setVersion;