diff --git a/exe/graphql-docs b/exe/graphql-docs index 6b0a03c..fee52cc 100755 --- a/exe/graphql-docs +++ b/exe/graphql-docs @@ -28,9 +28,15 @@ OptionParser.new do |parser| parser.on("-o", "--output-dir DIR", "Where the site is generated to, defaults to ./output") parser.on("-d", "--delete-output", "Delete the output-dir before generating, defaults to false") parser.on("-b", "--base-url URL", "URL to preprend for assets and links, defaults to \"\"") + parser.on("-v", "--version", "Show the version") parser.on("--verbose", "Run in verbose mode") end.parse!(into: opts) +if opts[:version] + puts("v#{GraphQLDocs::VERSION}") + exit +end + def err(msg) abort("#{NAME}: Error: #{msg}") end