-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
142 lines (121 loc) · 4.99 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
include ${STAGE}.env
#region SAM
build:
sam build \
--template ./templates/sam.template.yaml \
--parameter-overrides \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=DistributionId,ParameterValue=${DISTRIBUTION_ID} \
ParameterKey=Stage,ParameterValue=${STAGE}
local:
sam local invoke "${FUNCTION}" \
--parameter-overrides \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=DistributionId,ParameterValue=${DISTRIBUTION_ID} \
ParameterKey=Stage,ParameterValue=${STAGE}
validate:
sam validate \
--template ./templates/sam.template.yaml \
--lint
deploy-init:
sam deploy \
--stack-name rito-news-feeds-${STAGE} \
--config-env ${STAGE} \
--parameter-overrides \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=DistributionId,ParameterValue=${DISTRIBUTION_ID} \
ParameterKey=Stage,ParameterValue=${STAGE} \
--capabilities CAPABILITY_NAMED_IAM \
--guided
deploy:
sam deploy \
--stack-name rito-news-feeds-${STAGE} \
--config-file ./samconfig.toml \
--config-env ${STAGE} \
--parameter-overrides \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=DistributionId,ParameterValue=${DISTRIBUTION_ID} \
ParameterKey=Stage,ParameterValue=${STAGE}
remove:
sam delete \
--stack-name rito-news-feeds-${STAGE} \
--config-file ./templates/samconfig.toml \
--config-env ${STAGE}
#endregion SAM
#region CDN
cdn-create:
aws cloudformation create-stack \
--stack-name rito-news-cdn-stack-${STAGE} \
--template-body file://templates/cdn.template.yaml \
--region us-east-1 \
--capabilities CAPABILITY_NAMED_IAM \
--parameters \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=Stage,ParameterValue=${STAGE}
cdn-update:
aws cloudformation update-stack \
--stack-name rito-news-cdn-stack-${STAGE} \
--template-body file://templates/cdn.template.yaml \
--region us-east-1 \
--capabilities CAPABILITY_NAMED_IAM \
--parameters \
ParameterKey=DomainName,ParameterValue=${DOMAIN_NAME} \
ParameterKey=BucketName,ParameterValue=${BUCKET_NAME} \
ParameterKey=Stage,ParameterValue=${STAGE}
#endregion CDN
#region Build: League of Legends
build-LeagueOfLegendsStatusChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./lolstatus lol/status/main.go lol/status/utils.go
mv ./lolstatus $(ARTIFACTS_DIR)/bootstrap
build-LeagueOfLegendsNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./lolnews lol/news/main.go lol/news/utils.go
mv ./lolnews $(ARTIFACTS_DIR)/bootstrap
build-LeagueOfLegendsEsportsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./lolesports lol/esports/main.go lol/esports/utils.go
mv ./lolesports $(ARTIFACTS_DIR)/bootstrap
#endregion Build: League of Legends
#region Build: VALORANT
build-VALORANTStatusChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./valstatus val/status/main.go val/status/utils.go
mv ./valstatus $(ARTIFACTS_DIR)/bootstrap
build-VALORANTNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./valnews val/news/main.go val/news/utils.go
mv ./valnews $(ARTIFACTS_DIR)/bootstrap
build-VALORANTEsportsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./valesports val/esports/main.go val/esports/utils.go
mv ./valesports $(ARTIFACTS_DIR)/bootstrap
#endregion Build: VALORANT
#region Build: Legends of Runeterra
build-LegendsOfRuneterraStatusChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./lorstatus lor/status/main.go lor/status/utils.go
mv ./lorstatus $(ARTIFACTS_DIR)/bootstrap
build-LegendsOfRuneterraNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./lornews lor/news/main.go lor/news/utils.go
mv ./lornews $(ARTIFACTS_DIR)/bootstrap
#endregion Build: Legends of Runeterra
#region Build: Teamfight Tactics
build-TeamfightTacticsNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./tftnews tft/news/main.go tft/news/utils.go
mv ./tftnews $(ARTIFACTS_DIR)/bootstrap
#endregion Build: Teamfight Tactics
#region Build: WildRift
build-WildRiftStatusChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./wrstatus wr/status/main.go wr/status/utils.go
mv ./wrstatus $(ARTIFACTS_DIR)/bootstrap
build-WildRiftNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./wrnews wr/news/main.go wr/news/utils.go
mv ./wrnews $(ARTIFACTS_DIR)/bootstrap
#endregion Build: WildRift
#endregion Build: RiotGames
build-RiotGamesNewsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./riotgamesnews riotgames/news/main.go riotgames/news/utils.go
mv ./riotgamesnews $(ARTIFACTS_DIR)/bootstrap
build-RiotGamesJobsChecker:
GOARCH=arm64 GOOS=linux go build -trimpath -o ./riotgamesjobs riotgames/jobs/main.go riotgames/jobs/utils.go
mv ./riotgamesjobs $(ARTIFACTS_DIR)/bootstrap
#endregion Build: RiotGames