Skip to content

Commit e0b1f98

Browse files
committed
generating version, bumping to 0.2.0
1 parent 2447b0b commit e0b1f98

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
TOOL_NAME = stringray
2-
VERSION = 0.1.1
2+
VERSION = 0.2.0
33

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

1414
CONFIGURATION = debug
1515

16+
debug: generate_version
1617
debug: build
1718

19+
generate_version:
20+
@sed 's/__VERSION__/$(VERSION)/g' Version.swift.template > Sources/stringray/Version.swift
21+
1822
release:
1923
@echo $(SHA)
2024

@@ -30,8 +34,10 @@ install: clean build
3034
test:
3135
swift test $(SWIFTC_FLAGS)
3236

37+
xcode: generate_version
3338
xcode:
34-
swift package generate-xcodeproj --xcconfig-overrides=Overrides.xcconfig | xed .
39+
swift package generate-xcodeproj --xcconfig-overrides=Overrides.xcconfig
40+
xed .
3541

3642
clean:
3743
swift package clean

Sources/stringray/Version.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Utility
2+
3+
extension Version {
4+
static var current: Version = "0.2.0"
5+
}

Sources/stringray/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import Utility
1111
import CommandRegistry
1212

13-
var registry = Registry(usage: "<command> <options>", overview: "", version: Version(0, 1, 1))
13+
var registry = Registry(usage: "<command> <options>", overview: "", version: Version.current)
1414
registry.register(command: MoveCommand.self)
1515
registry.register(command: CopyCommand.self)
1616
registry.register(command: SortCommand.self)

Version.swift.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Utility
2+
3+
extension Version {
4+
static var current: Version = "__VERSION__"
5+
}

0 commit comments

Comments
 (0)