Skip to content

Commit e8a1142

Browse files
authored
1.6.2
1.6.2
2 parents 411f0ba + 37ebf51 commit e8a1142

8 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77

88
jobs:
99
publish:
10-
# 커밋 메시지가 버전 범핑 포맷([skip ci] - (v...)) 일 때만 실행
11-
if: "contains(github.event.head_commit.message, '[skip ci] - (v')"
10+
# 커밋 메시지가 버전 범핑 포맷([skip deploy] - (v...)) 일 때만 실행
11+
if: "contains(github.event.head_commit.message, '[skip deploy] - (v')"
1212
runs-on: ubuntu-latest
1313
permissions:
1414
contents: write

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
# Job 1: 변경사항 감지 및 PR 생성
1414
prepare-release:
15-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
15+
if: "!contains(github.event.head_commit.message, '[skip deploy]')"
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code

__tests__/kkuko/profile/components/ItemModal.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ItemModal', () => {
3939
expect(screen.getByText('장착 아이템 목록')).toBeInTheDocument();
4040
expect(screen.getByText('Cool Hat')).toBeInTheDocument();
4141
expect(screen.getByText('score:')).toBeInTheDocument();
42-
expect(screen.getByText('+10000')).toBeInTheDocument();
42+
expect(screen.getByText('+10')).toBeInTheDocument();
4343
});
4444

4545
it('should call onClose when close button is clicked', () => {

__tests__/kkuko/profile/utils/profileHelper.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ describe('profileHelper', () => {
6363
});
6464

6565
describe('formatNumber', () => {
66-
it('should divide by 1000 and return string', () => {
67-
expect(formatNumber(1500)).toBe('1.5');
68-
expect(formatNumber(10000)).toBe('10');
66+
it('should return string', () => {
67+
expect(formatNumber(0.014999999)).toBe('0.015');
68+
expect(formatNumber(0.12)).toBe('0.12');
6969
});
7070
});
7171

@@ -76,9 +76,9 @@ describe('profileHelper', () => {
7676
{ id: '2', name: 'Item2', description: '', group: '', options: { str: 3 }, updatedAt: 1 }
7777
];
7878
const result = calculateTotalOptions(items);
79-
// 1 * 1000 + 3 * 1000 = 4000
80-
expect(result['str']).toBe(4000);
81-
expect(result['dex']).toBe(2000);
79+
// 1 * 1 + 3 * 1 = 4
80+
expect(result['str']).toBe(4);
81+
expect(result['dex']).toBe(2);
8282
});
8383

8484
it('should handle special options', () => {
@@ -95,7 +95,7 @@ describe('profileHelper', () => {
9595
];
9696
const result = calculateTotalOptions(items);
9797
// Should use 'after'
98-
expect(result['str']).toBe(5000);
98+
expect(result['str']).toBe(5);
9999
});
100100

101101
it('should handle special options (before)', () => {
@@ -112,7 +112,7 @@ describe('profileHelper', () => {
112112
];
113113
const result = calculateTotalOptions(items);
114114
// Should use 'before'
115-
expect(result['str']).toBe(1000);
115+
expect(result['str']).toBe(1);
116116
});
117117
});
118118

app/kkuko/profile/components/ItemModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function ItemModal({ itemsData, profileData, onClose }: ItemModal
1717
const itemOptionUI = (key: string, value: number) => (
1818
<div key={key} className="bg-gray-50 dark:bg-gray-700 rounded px-3 py-2">
1919
<span className="text-sm text-gray-600 dark:text-gray-400">{getOptionName(key)}: </span>
20-
<span className="font-semibold text-gray-900 dark:text-gray-100">{value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100000 : 1000))}{key[0] === 'g' ? '%p' : ''}</span>
20+
<span className="font-semibold text-gray-900 dark:text-gray-100">{value > 0 ? '+' : ''}{formatNumber(value * (key[0] === 'g' ? 100 : 1))}{key[0] === 'g' ? '%p' : ''}</span>
2121
</div>
2222
)
2323

@@ -71,7 +71,7 @@ export default function ItemModal({ itemsData, profileData, onClose }: ItemModal
7171
const imageGroup = getImageGroup();
7272

7373
return (
74-
<div key={item.id} className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
74+
<div key={`${item.id}::${equipment?.slot}`} className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
7575
<div className="flex gap-4">
7676
{/* Item Image */}
7777
{imageGroup && (

app/kkuko/profile/utils/profileHelper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const extractColorFromLabel = (description: string, isDarkTheme: boolean)
3737
};
3838

3939
export const formatNumber = (num: number): string => {
40-
return (num / 1000).toString();
40+
return num.toFixed(3).replace(/\.?0+$/, '');
4141
};
4242

4343
export const calculateTotalOptions = (itemsData: ItemInfo[]) => {
@@ -48,13 +48,13 @@ export const calculateTotalOptions = (itemsData: ItemInfo[]) => {
4848
const relevantOptions = Date.now() >= item.options.date ? item.options.after : item.options.before;
4949
Object.entries(relevantOptions).forEach(([key, value]) => {
5050
if (value !== undefined && typeof value === 'number' && !isNaN(value)) {
51-
totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100000 : 1000);
51+
totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1);
5252
}
5353
});
5454
} else {
5555
Object.entries(item.options).forEach(([key, value]) => {
5656
if (value !== undefined && typeof value === 'number' && !isNaN(value)) {
57-
totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100000 : 1000);
57+
totals[key] = (totals[key] || 0) + Number(value) * (key[0] === 'g' ? 100 : 1);
5858
}
5959
});
6060
}

scripts/release.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ async function run() {
2828

2929
console.log(`ℹ️ Current Version: v${currentVersion}`);
3030

31-
// 2. [skip ci] 체크 (PR 모드일 때만)
31+
// 2. [skip deploy] 체크 (PR 모드일 때만)
3232
if (!isReleaseMode) {
3333
const log = await git.log({ maxCount: 1 });
3434
const lastCommitMsg = log.latest.message;
35-
if (lastCommitMsg.includes('[skip ci]')) {
36-
console.log('🛑 Last commit contains [skip ci]. Exiting...');
35+
if (lastCommitMsg.includes('[skip ci]') || lastCommitMsg.includes('[skip deploy]')) {
36+
console.log('🛑 Last commit contains [skip deploy]. Exiting...');
3737
return;
3838
}
3939
}
@@ -158,7 +158,7 @@ async function run() {
158158
// 8. Git 커밋 및 PR 생성
159159
if (!isDryRun) {
160160
const branchName = `release/${nextVersion}`;
161-
const commitMessage = `[skip ci] - (${nextVersion})`;
161+
const commitMessage = `[skip deploy] - (${nextVersion})`;
162162

163163
// Git 설정
164164
await git.addConfig('user.name', 'github-actions[bot]');

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "git log -1 --pretty=%B | grep -q '\\[skip ci\\]'"
3+
"ignoreCommand": "git log -1 --pretty=%B | grep -q '\\[skip deploy\\]'"
44
}

0 commit comments

Comments
 (0)