diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 0f4cfbf..a936bb6 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -36,6 +36,8 @@ jobs: BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} steps: - uses: actions/checkout@v2 + with: + fetch-tags: true - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} 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..19bca69 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 = `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'