Skip to content

Commit 21a89af

Browse files
authored
chore: use git default short commit-id (#7761)
1 parent 712f96d commit 21a89af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/sfc-playground/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineConfig, Plugin } from 'vite'
44
import vue from '@vitejs/plugin-vue'
55
import { execaSync } from 'execa'
66

7-
const commit = execaSync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
7+
const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout
88

99
export default defineConfig({
1010
plugins: [

scripts/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const sourceMap = args.sourcemap || args.s
4040
const isRelease = args.release
4141
const buildAllMatching = args.all || args.a
4242
const writeSize = args.size
43-
const commit = execaSync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
43+
const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout
4444

4545
const sizeDir = path.resolve('temp/size')
4646

0 commit comments

Comments
 (0)