Skip to content

Commit c4e74e5

Browse files
committed
Modified deployent process
1 parent 22bdb98 commit c4e74e5

5 files changed

Lines changed: 339 additions & 56 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
22
result/
33
output/
4+
dist/*.exe
45

56
# 배포 관련
67
release/

README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -175,31 +175,3 @@ WHERE CustomerID IN (${customerData.CustomerID})
175175
- **Website**: www.sql2excel.com
176176
- **Email**: [email protected]
177177

178-
179-
## License
180-
181-
MIT License
182-
183-
Copyright (c) 2024 MSSQL Data Migration Tool
184-
185-
Permission is hereby granted, free of charge, to any person obtaining a copy
186-
of this software and associated documentation files (the "Software"), to deal
187-
in the Software without restriction, including without limitation the rights
188-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
189-
copies of the Software, and to permit persons to whom the Software is
190-
furnished to do so, subject to the following conditions:
191-
192-
The above copyright notice and this permission notice shall be included in all
193-
copies or substantial portions of the Software.
194-
195-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
196-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
197-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
198-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
199-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
200-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
201-
SOFTWARE.
202-
203-
---
204-
205-
**Version**: v1.2.2 | **Last Updated**: 2025-08-20

USER_MANUAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,4 +835,4 @@ DEBUG_VARIABLES=true node src/excel-cli.js export --xml ./queries/sample.xml
835835
- **Documentation**: Refer to project documentation
836836
- **Issues**: Report issues via GitHub
837837
- **Email**: [email protected]
838-
- **Website**: sql2excel.com
838+
- **Website**: www.sql2excel.com

create-release.js

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,36 @@ const filesToCopy = [
5757
// 실행 파일
5858
{ src: `dist/sql2excel-v${version}.exe`, dest: `${releaseDir}/sql2excel-v${version}.exe` },
5959

60-
// 배치 파일
61-
{ src: 'dist/sql2excel.bat', dest: `${releaseDir}/sql2excel.bat` },
62-
{ src: 'dist/sql2excel-kr.bat', dest: `${releaseDir}/sql2excel-kr.bat` },
60+
// 배치 파일 (버전별로 exe 파일명 교체)
61+
{ src: 'dist/sql2excel-release.bat', dest: `${releaseDir}/sql2excel.bat`, replaceVersion: true },
6362

6463
// 설정 파일
6564
{ src: 'config/dbinfo.json', dest: `${releaseDir}/config/dbinfo.json` },
6665

6766
// 문서 파일
6867
{ src: 'README.md', dest: `${releaseDir}/README.md` },
69-
{ src: 'README_KR.md', dest: `${releaseDir}/README_KR.md` },
7068
{ src: 'USER_MANUAL.md', dest: `${releaseDir}/user_manual/USER_MANUAL.md` },
71-
{ src: 'USER_MANUAL_KR.md', dest: `${releaseDir}/user_manual/USER_MANUAL_KR.md` },
7269
{ src: 'CHANGELOG.md', dest: `${releaseDir}/user_manual/CHANGELOG.md` },
73-
{ src: 'CHANGELOG_KR.md', dest: `${releaseDir}/user_manual/CHANGELOG_KR.md` },
7470
{ src: 'LICENSE', dest: `${releaseDir}/LICENSE` }
7571
];
7672

7773
// 파일 복사
78-
filesToCopy.forEach(({ src, dest }) => {
74+
filesToCopy.forEach(({ src, dest, replaceVersion }) => {
7975
if (fs.existsSync(src)) {
8076
console.log(`- ${path.basename(dest)} 복사...`);
81-
fs.copyFileSync(src, dest);
77+
78+
if (replaceVersion) {
79+
// 배치 파일의 exe 파일명을 현재 버전으로 교체
80+
let content = fs.readFileSync(src, 'utf8');
81+
82+
// sql2excel.exe를 현재 버전으로 교체
83+
content = content.replace(/sql2excel\.exe/g, `sql2excel-v${version}.exe`);
84+
85+
console.log(` → exe 파일명을 sql2excel-v${version}.exe로 교체`);
86+
fs.writeFileSync(dest, content);
87+
} else {
88+
fs.copyFileSync(src, dest);
89+
}
8290
} else {
8391
console.warn(`⚠️ 파일을 찾을 수 없습니다: ${src}`);
8492
}
@@ -112,25 +120,46 @@ copyDirectory('templates', `${releaseDir}/templates`);
112120

113121
// 배포 정보 파일 생성
114122
console.log('- 배포 정보 파일 생성...');
115-
const deployInfo = `SQL2Excel v${version} 배포판
116-
117-
빌드 날짜: ${new Date().toLocaleString('ko-KR')}
118-
119-
포함된 파일:
120-
- sql2excel-v${version}.exe (메인 실행 파일)
121-
- sql2excel.bat (메뉴 인터페이스)
122-
- config/ (데이터베이스 설정)
123-
- queries/ (쿼리 샘플 파일)
124-
- templates/ (엑셀 스타일 템플릿)
125-
- 문서 파일들 (README, 사용자 매뉴얼 등)
126-
127-
사용법:
128-
1. sql2excel.bat 실행
129-
2. config/dbinfo.json에서 데이터베이스 연결 정보 설정
130-
3. queries/ 폴더의 샘플 파일 참고하여 쿼리 작성
131-
4. 메뉴에서 원하는 기능 선택하여 실행`;
132-
133-
fs.writeFileSync(`${releaseDir}/RELEASE_README.txt`, deployInfo);
123+
const deployInfo = `SQL2Excel v${version} Release Package
124+
125+
Build Date: ${new Date().toLocaleString('en-US')}
126+
127+
Included Files:
128+
- sql2excel-v${version}.exe (Main executable file)
129+
- sql2excel.bat (Menu interface)
130+
- config/ (Database configuration)
131+
- queries/ (Query sample files)
132+
- templates/ (Excel style templates)
133+
- user_manual/ (Documentation files - README, User Manual, etc.)
134+
135+
Usage:
136+
1. Run sql2excel.bat
137+
2. Configure database connection settings in config/dbinfo.json
138+
3. Create queries by referring to sample files in queries/ folder
139+
4. Select desired function from the menu
140+
141+
Features:
142+
- Multi-sheet Excel generation from SQL queries
143+
- Support for both XML and JSON query definitions
144+
- Variable substitution in queries
145+
- Multiple database support
146+
- Excel styling and formatting options
147+
- Data aggregation and statistics
148+
149+
System Requirements:
150+
- Windows operating system
151+
- SQL Server database access
152+
- No additional software installation required (standalone executable)
153+
154+
Quick Start:
155+
1. Extract all files to a folder
156+
2. Edit config/dbinfo.json with your database connection details
157+
3. Run sql2excel.bat to start the interactive menu
158+
4. Choose option 3 or 4 to generate Excel files from sample queries
159+
160+
For detailed instructions, please refer to the user manual files in the user_manual/ folder.`;
161+
162+
fs.writeFileSync(`${releaseDir}/RELEASE_INFO.txt`, deployInfo);
134163

135164
// 파일 개수 확인
136165
console.log();

0 commit comments

Comments
 (0)