phraseapp_updater 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9a01be297b026f1bcf98b8337306f7dd5340f15bd21dc7264ccf78aff82d242
4
- data.tar.gz: 6c8cd2024db62795d678b148621dd3556e5a7771daa33076e004a00d68bde88e
3
+ metadata.gz: f3d610d44e8c13cac7b5a663375c4c505782824abe3d6998cdc22ddb0a5222c6
4
+ data.tar.gz: b0147ba60c0181035c7e55fecbd3ab33d77b0e7b9be1f98ca645cc99d51698a6
5
5
  SHA512:
6
- metadata.gz: aab7ed4136379375aa89531722ce00af0d7027f0433ad0d77f2793a855966f59f286ad3f154f71c4bfe48a604275f72805e615f3be65e4abf58390f025f7f058
7
- data.tar.gz: 83aae79c39f421c21deed218e8c0bfa0dcfbbe663ec49520cda9dbd675268728877ce665aae5150d45438ccb5d241cfb23995d8c3168eb237c28689e5b37639c
6
+ metadata.gz: 93ef8934510ffef345f2a888f3fd0afaee91669922fc808ed7d945de4b70c6f9bcc3acc17a2a8dfba28152e5109644c28b85d46290244b184905530b590cca78
7
+ data.tar.gz: 6795589ad887442ffd31dfbec8513c42960899b4683a17e708c1421630b52ff85d69e890aa5f969ce015dca2804e9f447b55aebca6f6ecb1e78f9057b70c5b1c
@@ -48,7 +48,7 @@ class PhraseAppUpdaterCLI < Thor
48
48
  ENV['FILE_FORMAT'] = options[:file_format]
49
49
  ENV['NO_COMMIT'] = options[:no_commit] ? 't' : 'f'
50
50
  ENV['PREFIX'] = options[:prefix]
51
- ENV['BRANCH'] = options.fetch(:branch) { sh('git name-rev --name-only HEAD').chomp }
51
+ ENV['BRANCH'] = options.fetch(:branch) { sh('git rev-parse --abbrev-ref HEAD').chomp }
52
52
  ENV['REMOTE'] = options.fetch(:remote) { sh("git config branch.#{ENV['BRANCH']}.remote").chomp }
53
53
 
54
54
  shell_script_path = File.join(__dir__, 'synchronize_phraseapp.sh')
@@ -78,9 +78,11 @@ if [ "${phraseapp_changed}" = 't' ] && [ "${branch_changed}" = 't' ]; then
78
78
 
79
79
  if [ "$NO_COMMIT" != 't' ]; then
80
80
  # Create a commit to record the pre-merge state of PhraseApp
81
- phraseapp_commit=$(git commit-tree "${current_phraseapp_tree}" \
81
+ phraseapp_commit_tree=$(replace_nested_tree "${common_ancestor}^{tree}" "${PREFIX}" "${current_phraseapp_tree}")
82
+ phraseapp_commit=$(git commit-tree "${phraseapp_commit_tree}" \
82
83
  -p "${common_ancestor}" \
83
- -m "Remote locale changes made on PhraseApp (drop when rebasing)")
84
+ -m "Remote locale changes made on PhraseApp" \
85
+ -m "These changes may be safely flattened into their merge commit when rebasing.")
84
86
 
85
87
  # Commit merge result to PREFIX in BRANCH
86
88
  merge_resolution_tree=$(make_tree_from_directory "${merge_resolution_path}")
@@ -89,7 +91,8 @@ if [ "${phraseapp_changed}" = 't' ] && [ "${branch_changed}" = 't' ]; then
89
91
  merge_commit=$(git commit-tree "${merged_branch_tree}" \
90
92
  -p "${current_branch}" \
91
93
  -p "${phraseapp_commit}" \
92
- -m "Merged locale changes from PhraseApp")
94
+ -m "Merged locale changes from PhraseApp" \
95
+ -m "X-PhraseApp-Merge: ${phraseapp_commit}")
93
96
 
94
97
  # Push to BRANCH
95
98
  git push "${REMOTE}" "${merge_commit}:refs/heads/${BRANCH}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class PhraseAppUpdater
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phraseapp_updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Griffin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-23 00:00:00.000000000 Z
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor