Skip to content

Commit

Permalink
docs: cannot actually pass compile time variables in swift
Browse files Browse the repository at this point in the history
this is nuts!
  • Loading branch information
iloveitaly committed Feb 22, 2023
1 parent 26650b8 commit 0941d16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/hyper-focus/command.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ struct HyperFocus: ParsableCommand {

mutating func run() throws {
if version {
// TODO: get latest git tag at swift compile time, doesn't seem like this is easy
print("0.1.7")
// we cannot get the latest tag version at compile time
// https://stackoverflow.com/questions/27804227/using-compiler-variables-in-swift
print("v0.1.7")
return
}

Expand Down

0 comments on commit 0941d16

Please sign in to comment.