@@ -2,7 +2,6 @@ import dotenv from "dotenv";
2
2
import path from "path" ;
3
3
4
4
import { MakerDMG } from "@electron-forge/maker-dmg" ;
5
- import { DMGContents } from "@electron-forge/maker-dmg/dist/Config" ;
6
5
import { MakerSquirrel } from "@electron-forge/maker-squirrel" ;
7
6
import { MakerZIP } from "@electron-forge/maker-zip" ;
8
7
import { VitePlugin } from "@electron-forge/plugin-vite" ;
@@ -24,12 +23,6 @@ const APPLE_API_KEY_ID = process.env["APPLE_API_KEY_ID"] ?? "";
24
23
const APPLE_API_ISSUER = process . env [ "APPLE_API_ISSUER" ] ?? "" ;
25
24
const FEED_BASE_URL = process . env [ "FEED_BASE_URL" ] ?? "" ;
26
25
27
- // aws : r2로 변경할 예정이라 추후 삭제해야함.
28
- const AWS_ACCESS_KEY_ID = process . env [ "AWS_ACCESS_KEY_ID" ] ?? "" ;
29
- const AWS_SECRET_ACCESS_KEY = process . env [ "AWS_SECRET_ACCESS_KEY" ] ?? "" ;
30
- const AWS_DEFAULT_REGION = process . env [ "AWS_DEFAULT_REGION" ] ?? "" ;
31
- const AWS_BUCKET = process . env [ "AWS_BUCKET" ] ?? "boxhero-autoupdate" ;
32
-
33
26
// r2
34
27
const R2_ACCESS_KEY_ID = process . env [ "R2_ACCESS_KEY_ID" ] ?? "" ;
35
28
const R2_SECRET_ACCESS_KEY = process . env [ "R2_SECRET_ACCESS_KEY" ] ?? "" ;
@@ -95,33 +88,20 @@ const config: ForgeConfig = {
95
88
position : { x : 200 , y : 120 } ,
96
89
} ,
97
90
} ,
98
- /**
99
- * NOTE: electron forge의 maker-dmg의 Config 타입선언에 문제가 있음.
100
- * 1. DMGContents에 name prop을 필수로 지정하게 강제함.
101
- * 지정할 경우 앱 아이콘 등이 정상적으로 표시되지 않는다.
102
- * maker-dmg가 의존하고 있는 electron-installer-dmg, appdmg 패키지는 정작 name이 optional이고 예시에서도 사용안함.
103
- * 2. contents에 factory 함수를 지정할 때 Parameter 타입선언이 실제 데이터와 맞지 않음.
104
- * Parameter로 opts를 넘겨주는데,
105
- * 실제로 들어오는 데이터는 electron-installer-dmg에서 기본 옵션 외에 build context에 관련된 정보들이 추가된 데이터임.
106
- * (e.g. opts.appPath, opts.dmgPath, etc..)
107
- * 이를 통해 사용자가 contents를 context에 맞는 정보들로 정확한 설정을 구성할 수 있음에도 타입 선언에 반영이 되어있지 않음.
108
- * TODO: 이후 electron-installer-dmg가 수정되면 타입 단언들을 제거할 것.
109
- */
110
- contents : ( opts ) =>
111
- [
112
- {
113
- type : "file" ,
114
- path : ( opts as { appPath : string } ) . appPath ,
115
- x : 164 ,
116
- y : 200 ,
117
- } ,
118
- {
119
- type : "link" ,
120
- path : "/Applications" ,
121
- x : 409 ,
122
- y : 200 ,
123
- } ,
124
- ] as unknown as DMGContents [ ] ,
91
+ contents : ( opts ) => [
92
+ {
93
+ type : "file" ,
94
+ path : ( opts as { appPath : string } ) . appPath ,
95
+ x : 164 ,
96
+ y : 200 ,
97
+ } ,
98
+ {
99
+ type : "link" ,
100
+ path : "/Applications" ,
101
+ x : 409 ,
102
+ y : 200 ,
103
+ } ,
104
+ ] ,
125
105
} ) ,
126
106
] ,
127
107
publishers : [
@@ -131,16 +111,6 @@ const config: ForgeConfig = {
131
111
prerelease : true ,
132
112
draft : true ,
133
113
} ) ,
134
- new PublisherS3 ( {
135
- bucket : AWS_BUCKET ,
136
- region : AWS_DEFAULT_REGION ,
137
- accessKeyId : AWS_ACCESS_KEY_ID ,
138
- secretAccessKey : AWS_SECRET_ACCESS_KEY ,
139
- keyResolver ( fileName ) {
140
- return `${ prefix } /${ fileName } ` ;
141
- } ,
142
- public : true ,
143
- } ) ,
144
114
new PublisherS3 ( {
145
115
bucket : R2_BUCKET ,
146
116
region : R2_DEFAULT_REGION ,
0 commit comments