Skip to content

Commit

Permalink
Separate sourcery target into MasterRuleList.swift and `LinuxMain…
Browse files Browse the repository at this point in the history
….swift`

Also set dependencies on each targets.
  • Loading branch information
norio-nomura committed Nov 25, 2017
1 parent 9f3154e commit 40c2eb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ VERSION_STRING=$(shell /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionSt

all: build

sourcery:
sourcery: Tests/LinuxMain.swift Source/SwiftLintFramework/Models/MasterRuleList.swift

Tests/LinuxMain.swift: Tests/*/*.swift
sourcery --sources Tests --templates .sourcery/LinuxMain.stencil --output .sourcery
sed -e 4,11d .sourcery/LinuxMain.generated.swift > .sourcery/LinuxMain.swift
sed -n 4,10p .sourcery/LinuxMain.generated.swift | cat - .sourcery/LinuxMain.swift > Tests/LinuxMain.swift
rm .sourcery/LinuxMain.swift .sourcery/LinuxMain.generated.swift

Source/SwiftLintFramework/Models/MasterRuleList.swift: Source/SwiftLintFramework/Rules/*.swift
sourcery --sources Source/SwiftLintFramework/Rules --templates .sourcery/MasterRuleList.stencil --output .sourcery
sed -e 4,11d .sourcery/MasterRuleList.generated.swift > .sourcery/MasterRuleList.swift
sed -n 4,10p .sourcery/MasterRuleList.generated.swift | cat - .sourcery/MasterRuleList.swift > Source/SwiftLintFramework/Models/MasterRuleList.swift
Expand Down

0 comments on commit 40c2eb2

Please sign in to comment.