forked from darksith666/magento2-ee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
35 lines (30 loc) · 1015 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'rainbow/refinement'
require_relative '.bin/phraseapp/wd-phraseapp.rb'
require_relative '.bin/phraseapp/wd-project.rb'
using Rainbow
#-------------------------------------------------------------------------------
# PhraseApp tasks
#-------------------------------------------------------------------------------
namespace :phraseapp do
desc 'Pull locale files'
task :pull do
WdPhraseApp.new.pull_locales
end
desc 'Parse translatable keys and push to a PhraseApp branch'
task :push do
if WdProject.new.worktree_has_key_changes?
WdPhraseApp.new.push_to_branch
end
end
desc '[CI] Pull locales, commit & push to git remote'
task :ci_update do
WdPhraseApp.new.pull_locales && WdProject.new.commit_push_pr_locales
end
desc '[CI] Check if PhraseApp is up to date with the project'
task :ci_check_if_in_sync do
unless WdPhraseApp.new.is_in_sync?
puts 'PhraseApp is not in sync with the current commit. Exiting.'.red.bright
exit(1)
end
end
end