Commit 3ff02f29 authored by Alex Ives's avatar Alex Ives

Automate releases

parent ffe7d4ac
Pipeline #100408182 failed
timer_*.txt
\ No newline at end of file
timer_*.txt
Timer.alfredworkflow
......@@ -5,12 +5,24 @@ rspec:
stage: test
image: ruby:2.6
script:
- bundle install
- bundle install --without=release
- bundle exec rspec
rubocop:
stage: test
image: ruby:2.6
script:
- bundle install
- bundle install --without=release
- bundle exec rubocop
build:
stage: build
image: ruby:2.6
only:
- master
script:
- bundle install
- bundle exec rake package
artifacts:
paths:
- Timer.alfredworkflow
......@@ -2,5 +2,13 @@
source 'https://rubygems.org'
gem 'rspec'
gem 'rubocop'
group :test do
gem 'rspec'
gem 'rubocop'
gem 'rake'
end
group :release do
gem 'rubyzip'
gem 'plist'
end
\ No newline at end of file
......@@ -7,7 +7,9 @@ GEM
parallel (1.19.1)
parser (2.6.5.0)
ast (~> 2.4.0)
plist (3.5.0)
rainbow (3.0.0)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
......@@ -29,14 +31,18 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
rubyzip (2.0.0)
unicode-display_width (1.6.0)
PLATFORMS
ruby
DEPENDENCIES
plist
rake
rspec
rubocop
rubyzip
BUNDLED WITH
1.17.3
task :package do
require 'zip'
require 'plist'
# Update Version
if ENV['CI_COMMIT_TAG']
result = Plist.parse_xml('info.plist')
result['version'] = ENV['CI_COMMIT_TAG']
File.write('info.plist', result.to_plist)
end
folder = FileUtils.pwd
input_filenames = Dir['lib/*'] + [
'icon.png',
'info.plist'
]
output_filename = "#{folder}/Timer.alfredworkflow"
Zip::File.open(output_filename, Zip::File::CREATE) do |zipfile|
input_filenames.each do |filename|
zipfile.add(filename, File.join(folder, filename))
end
zipfile.get_output_stream("myFile") { |f| f.write "myFile contains just this" }
end
end
......@@ -80,9 +80,9 @@
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>require File.expand_path('lib/timer.rb')
puts set_timer(ARGV[0])</string>
<string>require File.expand_path(&#39;lib/timer.rb&#39;)
puts set_timer(ARGV[0])</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
......@@ -186,10 +186,10 @@ puts set_timer(ARGV[0])</string>
<key>runningsubtext</key>
<string></string>
<key>script</key>
<string>require File.expand_path('lib/filter_timers.rb')
puts get_timers
</string>
<string>require File.expand_path(&#39;lib/filter_timers.rb&#39;)
puts get_timers
</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
......@@ -218,7 +218,7 @@ puts get_timers
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>rm "{query}"</string>
<string>rm &quot;{query}&quot;</string>
<key>scriptargtype</key>
<integer>0</integer>
<key>scriptfile</key>
......@@ -235,7 +235,7 @@ puts get_timers
</dict>
</array>
<key>readme</key>
<string>This is a basic timer for alfred. You can view timers by typing "timers" you can set a timer by typing "timer" and giving it something like "2d 3h 5m 7s" which would set a timer for 2 days, 3 hours, 5 minuts and 7 seconds. This is only accurate to witin 2-3 seconds. It's not for high precision stuff.</string>
<string>This is a basic timer for alfred. You can view timers by typing &quot;timers&quot; you can set a timer by typing &quot;timer&quot; and giving it something like &quot;2d 3h 5m 7s&quot; which would set a timer for 2 days, 3 hours, 5 minuts and 7 seconds. This is only accurate to witin 2-3 seconds. It&#39;s not for high precision stuff.</string>
<key>uidata</key>
<dict>
<key>16039760-F173-4AB8-9C73-DA7401D5DE23</key>
......@@ -286,6 +286,6 @@ puts get_timers
<key>version</key>
<string>1.0.0</string>
<key>webaddress</key>
<string>alex.ives.mn</string>
<string>https://alex.ives.mn</string>
</dict>
</plist>
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