Skip to content

Commit

Permalink
port duplicate release check
Browse files Browse the repository at this point in the history
  • Loading branch information
okwolf committed Sep 7, 2019
1 parent df75681 commit 4d5bc24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tead",
"version": "0.5.1",
"version": "0.5.2",
"description": "Lighting the way to simpler testing",
"files": [
"src",
Expand Down
6 changes: 6 additions & 0 deletions pre-flight-tests
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node

const { execSync } = require("child_process");
const { version } = require("./package");
const exec = command => execSync(command, { encoding: "utf8" }).trim();

const exitWithError = error => {
Expand All @@ -17,3 +18,8 @@ const workingCopyChanges = exec("git status --porcelain");
if (workingCopyChanges) {
exitWithError("please commit your changes before making a release!");
}

const tagExists = exec(`git tag -l "${version}"`);
if (tagExists) {
exitWithError(`${version} has already been released!`);
}

0 comments on commit 4d5bc24

Please sign in to comment.