Skip to content

Commit

Permalink
Fix version-utils.js for node 14
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM authored Sep 3, 2021
1 parent e78ad79 commit 8141e0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build/version-utils.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env node

const execSync = require('child_process').execSync;
const semver = require('semver');
import child_process from 'child_process';
import semver from 'semver';

const args = process.argv.slice(2);

function latestVersionTag() {
const latestVersionTag = execSync('git describe --tags --match=v*.*.* --abbrev=0')
const latestVersionTag = child_process.execSync('git describe --tags --match=v*.*.* --abbrev=0')
.toString()
.trim();
return latestVersionTag;
}

function latestFromTags() {
const currentVersion = execSync('git describe --tags --match=v*.*.* --abbrev=0')
const currentVersion = child_process.execSync('git describe --tags --match=v*.*.* --abbrev=0')
.toString()
.trim()
.replace(/^v/, '');
return currentVersion;
}

function listTags() {
let gitTags = execSync('git log --no-walk --tags --pretty=format:%S')
let gitTags = child_process.execSync('git log --no-walk --tags --pretty=format:%S')
.toString()
.split('\n')
.reduce((filtered, tag) => {
Expand Down

0 comments on commit 8141e0b

Please sign in to comment.