-
Notifications
You must be signed in to change notification settings - Fork 0
/
generatemock.sh
27 lines (21 loc) · 1.09 KB
/
generatemock.sh
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
#!/bin/bash
if which mint >/dev/null; then
rm -f $SRCROOT/MockResults.swift
# Repository
rm -f $SRCROOT/Mocks/RepositoryMockResults.swift
mint run mockolo mockolo --sourcedirs $SRCROOT/Domain/Repository --destination $SRCROOT/Mocks/RepositoryMockResults.swift
# UseCase
rm -f $SRCROOT/Mocks/UseCaseMockResults.swift
mint run mockolo mockolo --sourcedirs $SRCROOT/Domain/UseCase --destination $SRCROOT/Mocks/UseCaseMockResults.swift
# Infrastructure
rm -f $SRCROOT/Mocks/InfrastructureMockResults.swift
mint run mockolo mockolo --sourcedirs $SRCROOT/Qiitable/Infrastructure --testable-imports Qiitable --destination $SRCROOT/Mocks/InfrastructureMockResults.swift
# Router
rm -f $SRCROOT/Mocks/RouterMockResults.swift
mint run mockolo mockolo --sourcedirs $SRCROOT/Qiitable/Router --destination $SRCROOT/Mocks/RouterMockResults.swift
# Presenter
rm -f $SRCROOT/Mocks/PresenterMockResults.swift
mint run mockolo mockolo --sourcedirs $SRCROOT/Qiitable/Presenter --destination $SRCROOT/Mocks/PresenterMockResults.swift
else
echo "warning: Mint not installed, download from https://github.com/yonaskolb/Mint"
fi