Commit 77e9f651 authored by Alex Ives's avatar Alex Ives

Use git tag as latest version when building

parent b53657c2
Pipeline #100421816 failed with stages
in 25 seconds
......@@ -4,24 +4,25 @@ stages:
rspec:
stage: test
image: ruby:2.6
image: ruby:2.6-alpine
script:
- bundle install --without=release
- bundle exec rspec
rubocop:
stage: test
image: ruby:2.6
image: ruby:2.6-alpine
script:
- bundle install --without=release
- bundle exec rubocop
build:
stage: build
image: ruby:2.6
image: ruby:2.6-alpine
only:
- master
script:
- apk add --no-cache git
- bundle install
- bundle exec rake package
artifacts:
......
......@@ -3,9 +3,9 @@ task :package do
require 'plist'
# Update Version
if ENV['CI_COMMIT_TAG']
if version = `git describe --tags`.strip
result = Plist.parse_xml('info.plist')
result['version'] = ENV['CI_COMMIT_TAG']
result['version'] = version
File.write('info.plist', result.to_plist)
end
......
......@@ -27,4 +27,4 @@ bundle exec rspec
```
bundle exec rake package
```
\ No newline at end of file
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment