Skip to content

Commit

Permalink
chore: añadir tarea para publicar
Browse files Browse the repository at this point in the history
  • Loading branch information
jesustorresdev committed Sep 10, 2023
1 parent 2f6c47a commit ad24656
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,18 @@ task :server, [:port] => 'build:www' do |t, args|

puts "=> Server starting on http://0.0.0.0:#{args.port}"
server.start
end

desc 'Publich release'
task :publish, [:yeartag] do |t, args|
if ! args[:yeartag]
raise "Argument 'yeartag' is required."
end

release_branch = "curso-#{args[:yeartag]}"
release_tag = "so#{args[:yeartag]}"

sh 'git', 'rebase', 'master', release_branch
sh 'git', 'tag', '-f', release_tag, release_branch
sh 'git', 'push', '--atomic', '-f', 'origin', release_branch, release_tag
end

0 comments on commit ad24656

Please sign in to comment.