forked from rosberry/ledger-ios
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
28 lines (23 loc) · 1.06 KB
/
Makefile
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
TEMPLATE_NAME=MyFramework
PROJECT_NAME=MyFramework
# phony targets
.PHONY: all generate rename
# default target
all: generate
init: rename generate
rename:
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' framework.yml
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' Package.swift
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' README.md
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' .jazzy.yaml
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' $(TEMPLATE_NAME).podspec
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' $(TEMPLATE_NAME).xcworkspace/contents.xcworkspacedata
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' .github/workflows/build.yml
sed -i '' 's|$(TEMPLATE_NAME)|$(PROJECT_NAME)|g' .github/workflows/test.yml
mv $(TEMPLATE_NAME).podspec $(PROJECT_NAME).podspec
mv $(TEMPLATE_NAME).xcworkspace $(PROJECT_NAME).xcworkspace
mv $(TEMPLATE_NAME) $(PROJECT_NAME)
generate:
xcodegen generate --spec framework.yml --project $(PROJECT_NAME) --use-cache
xcodegen generate --spec example.yml --project Example --use-cache
open $(PROJECT_NAME).xcworkspace