Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ammanvedi committed May 10, 2020
2 parents 8fe87ad + 1e56881 commit b5ca7ac
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
Binary file modified bin/embark
Binary file not shown.
4 changes: 2 additions & 2 deletions embark.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Embark < Formula
desc "A command line tool to help with git releases"
homepage "https://github.com/ammanvedi/embark"
url "https://github.com/ammanvedi/embark/archive/v1.1.10.tar.gz"
version "1.1.10"
url "https://github.com/ammanvedi/embark/archive/v2.0.00.tar.gz"
version "2.0.00"

bottle :unneeded

Expand Down
6 changes: 3 additions & 3 deletions src/test/testReleaseTest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ suite "validateVersion":

suite "bumpSemanticVersion":
test "bumps major version":
let res = bumpSemanticVersion("1.0.0", "major")
let res = bumpSemanticVersion("1.1.1", "major")
require(res == "2.0.0")
test "bumps minor version":
let res = bumpSemanticVersion("1.0.0", "minor")
require(res == "1.1.0")
let res = bumpSemanticVersion("1.1.1", "minor")
require(res == "1.2.0")
test "bumps patch version":
let res = bumpSemanticVersion("1.0.0", "patch")
require(res == "1.0.1")
Expand Down
10 changes: 8 additions & 2 deletions src/testRelease.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ proc bumpSemanticVersion*(version: string, bump: string): string =
var newVersion = versionComponents

# Bump the version using int attached to enum as index to edit
let toBump = parseInt(newVersion[versionBump.int])
newVersion[versionBump.int] = intToStr(toBump + 1)


for ix, versionComponent in newVersion:
if ix == versionBump.int:
let toBump = parseInt(newVersion[versionBump.int])
newVersion[versionBump.int] = intToStr(toBump + 1)
if ix > versionBump.int:
newVersion[ix] = "0"

return join(newVersion, ".")

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.10
2.0.0

0 comments on commit b5ca7ac

Please sign in to comment.