Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luongvo committed Aug 28, 2023
1 parent 2169d80 commit 61a830d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,13 @@ jobs:
# - name: Clean up previous code coverage report
# run: bundle exec fastlane cleanUpOutput

- name: \[Workaround\] Running Danger SwiftFormat from non-root directory
- name: __Workaround__ Running Danger SwiftFormat from non-root directory
run: |
gem which danger
gem which danger-swiftformat
# Find the path of danger_swiftformat
danger_swiftformat_path=$(echo "$(gem which danger_swiftformat)" | sed 's/\/danger_swiftformat.rb//')
echo $danger_swiftformat_path
# Insert a map operator in the "find_swift_files" method to remove "sample/ios/" prefix from all files.
sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" '/Users/luongvo/.rvm/gems/ruby-3.0.0/gems/danger-swiftformat-0.8.1/lib/swiftformat/plugin.rb'
sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" "$danger_swiftformat_path/swiftformat/plugin.rb"
- name: Run Danger to wrap up the review
env:
Expand Down

0 comments on commit 61a830d

Please sign in to comment.