Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix linebreak in commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tineheller committed Sep 22, 2017
1 parent 7a3c32b commit a9c71c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/createVersionNumber.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
const { exec } = require('child_process');
const fs = require('fs');

const commitLength = 6;

function determineVersion() {
return new Promise((resolve, reject) => {
exec('"git" describe --abbrev=6 --dirty --always --tags --long', function(err, stdout, stderr) {
exec(`"git" describe --abbrev=${commitLength} --dirty --always --tags --long`, function(err, stdout, stderr) {
if (err) {
return reject(err);
} else {
let output = stdout.split("-");
if (output && output.length >= 3) {
let newestTag = output[0];
let numbers = newestTag.split(".");
let commit = output[2].substr(1, output[2].length-1);
let commit = output[2].substr(1, commitLength);
return resolve({
commit: commit,
major: numbers[0],
Expand Down

0 comments on commit a9c71c8

Please sign in to comment.