Skip to content

Commit

Permalink
generating version, bumping to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
g-Off committed Dec 11, 2018
1 parent 2447b0b commit e0b1f98
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TOOL_NAME = stringray
VERSION = 0.1.1
VERSION = 0.2.0

REPO = https://github.com/g-Off/$(TOOL_NAME)
RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz
Expand All @@ -13,8 +13,12 @@ SWIFTC_FLAGS = -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.13"

CONFIGURATION = debug

debug: generate_version
debug: build

generate_version:
@sed 's/__VERSION__/$(VERSION)/g' Version.swift.template > Sources/stringray/Version.swift

release:
@echo $(SHA)

Expand All @@ -30,8 +34,10 @@ install: clean build
test:
swift test $(SWIFTC_FLAGS)

xcode: generate_version
xcode:
swift package generate-xcodeproj --xcconfig-overrides=Overrides.xcconfig | xed .
swift package generate-xcodeproj --xcconfig-overrides=Overrides.xcconfig
xed .

clean:
swift package clean
Expand Down
5 changes: 5 additions & 0 deletions Sources/stringray/Version.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Utility

extension Version {
static var current: Version = "0.2.0"
}
2 changes: 1 addition & 1 deletion Sources/stringray/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import Utility
import CommandRegistry

var registry = Registry(usage: "<command> <options>", overview: "", version: Version(0, 1, 1))
var registry = Registry(usage: "<command> <options>", overview: "", version: Version.current)
registry.register(command: MoveCommand.self)
registry.register(command: CopyCommand.self)
registry.register(command: SortCommand.self)
Expand Down
5 changes: 5 additions & 0 deletions Version.swift.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Utility

extension Version {
static var current: Version = "__VERSION__"
}

0 comments on commit e0b1f98

Please sign in to comment.