Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jul 11, 2019
1 parent 934f8b9 commit 8875d12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prisma2/scripts/bump-version.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env node

const currentVersion = process.argv[2]
const currentVersion = trimQuotes(process.argv[2])

const lastDot = currentVersion.lastIndexOf('.')
const alphaNumber = currentVersion.slice(lastDot + 1)
const newVersion = currentVersion.slice(0, lastDot + 1) + (Number(alphaNumber) + 1)

console.log(newVersion)

function trimQuotes(str) {
return str.replace(/"/g, '')
}

0 comments on commit 8875d12

Please sign in to comment.