chore: use git default short commit-id (#7761)

This commit is contained in:
JayFate 2023-10-20 17:31:50 +08:00 committed by GitHub
parent 712f96d6ac
commit 21a89af9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import { defineConfig, Plugin } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import { execaSync } from 'execa' import { execaSync } from 'execa'
const commit = execaSync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7) const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [

View File

@ -40,7 +40,7 @@ const sourceMap = args.sourcemap || args.s
const isRelease = args.release const isRelease = args.release
const buildAllMatching = args.all || args.a const buildAllMatching = args.all || args.a
const writeSize = args.size const writeSize = args.size
const commit = execaSync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7) const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout
const sizeDir = path.resolve('temp/size') const sizeDir = path.resolve('temp/size')