Files
wechaty--wechaty/scripts/generate-package-json.sh
wehub-resource-sync d5f55b5f9c
Coverage / build (push) Waiting to run
Docker / Build (push) Waiting to run
Docker / Publish (push) Blocked by required conditions
Node.js CI / build (16, macos-latest) (push) Waiting to run
Node.js CI / build (16, ubuntu-latest) (push) Waiting to run
Node.js CI / build (16, windows-latest) (push) Waiting to run
NPM / Build (22) (push) Waiting to run
NPM / Pack (push) Blocked by required conditions
NPM / Publish (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 12:40:42 +08:00

23 lines
542 B
Bash
Executable File

#!/usr/bin/env bash
set -e
SRC_PACKAGE_JSON_TS_FILE='src/package-json.ts'
[ -f ${SRC_PACKAGE_JSON_TS_FILE} ] || {
echo ${SRC_PACKAGE_JSON_TS_FILE}" not found"
exit 1
}
GIT_COMMIT_HASH=$(git rev-parse HEAD)
cat <<_SRC_ > ${SRC_PACKAGE_JSON_TS_FILE}
/* eslint-disable */
/**
* This file was auto generated from scripts/generate-version.sh
*/
import type { PackageJsonWechaty } from './config'
export const GIT_COMMIT_HASH: string = '${GIT_COMMIT_HASH}'
export const packageJson: PackageJsonWechaty = $(cat package.json) as any
_SRC_