Skip to content

Commit

Permalink
Merge pull request #100 from hugopl/version
Browse files Browse the repository at this point in the history
Remove archived dependency and add --version
  • Loading branch information
elbywan authored Nov 6, 2024
2 parents 814ab16 + 70b1947 commit bfb0b3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 0 additions & 4 deletions shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ shards:
git: https://github.com/samueleaton/sentry.git
version: 0.3.2+git.commit.e448ce83486f99ef016c311e10ec0cac805cded3

version_from_shard:
git: https://github.com/hugopl/version_from_shard.git
version: 1.2.5

2 changes: 0 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ targets:
dependencies:
lsp:
github: elbywan/crystal-lsp
version_from_shard:
github: hugopl/version_from_shard
priority-queue:
github: spider-gazelle/priority-queue

Expand Down
5 changes: 5 additions & 0 deletions src/crystalline.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
require "./crystalline/requires"
require "./crystalline/*"

if ARGV.includes?("--version")
puts(Crystalline::VERSION)
exit
end

Crystalline.init
5 changes: 2 additions & 3 deletions src/crystalline/main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ require "log"
require "lsp/server"
require "./ext/*"
require "./*"
require "version_from_shard"

module Crystalline
VersionFromShard.declare(__DIR__)

VERSION = {{ (`shards version #{__DIR__}`.strip + "+" +
system("git rev-parse --short HEAD || echo unknown").stringify).stringify.strip }}
# Supported server capabilities.
SERVER_CAPABILITIES = LSP::ServerCapabilities.new(
text_document_sync: LSP::TextDocumentSyncKind::Incremental,
Expand Down

0 comments on commit bfb0b3b

Please sign in to comment.