diff --git a/VERSION b/VERSION deleted file mode 100644 index 78bc1ab..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.10.0 diff --git a/netbox-client-ruby.gemspec b/netbox-client-ruby.gemspec index 72e5a3b..37b75df 100644 --- a/netbox-client-ruby.gemspec +++ b/netbox-client-ruby.gemspec @@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = 'netbox-client-ruby' - spec.version = File.read(File.expand_path('VERSION', __dir__)).strip + spec.version = (ENV["GITHUB_REF_NAME"] || `git describe --tags --match="v[0-9]*" --abbrev=0`).strip.delete_prefix("v") spec.summary = 'A read/write client for Netbox v2.' spec.homepage = 'https://github.com/ninech/netbox-client-ruby'