Skip to content

Commit

Permalink
fix: default to OS detection at compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Jul 14, 2020
1 parent 5d15ee9 commit 72ebbe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pinger
version: 1.0.1
version: 1.1.0

authors:
- Caspian Baska <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions src/pinger.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class Pinger
getter pinger
end

VERSION = "0.1.0"
VERSION = {{ system(%(shards version "#{__DIR__}")).chomp.stringify.downcase }}

# Host OS
{% if env("UNAME_AT_COMPILE_TIME") %}
OS = {{ system("uname").stringify.strip.downcase }}
{% else %}
{% if env("UNAME_AT_RUN_TIME") %}
OS = `uname`.strip.downcase
{% else %}
OS = {{ system("uname").stringify.strip.downcase }}
{% end %}

@ip : Socket::IPAddress?
Expand Down

0 comments on commit 72ebbe2

Please sign in to comment.