mirror of
https://github.com/hanzozt/console.git
synced 2026-10-30 18:15:39 +00:00
- Repo names: ziti-* → zt-* - Go modules: github.com/hanzozt/ziti → github.com/hanzozt/zt - Docker images: hanzozt/ziti-* → hanzozt/zt-* - C/Java/JS symbols: ziti_* → zt_* - File and directory names updated
18 lines
574 B
JavaScript
18 lines
574 B
JavaScript
import fs from 'fs';
|
|
import fsExtra from 'fs-extra';
|
|
import path from 'path';
|
|
import {fileURLToPath} from "url";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const packageJsonRaw = fs.readFileSync("./package.json", 'utf8');
|
|
const packageJson = JSON.parse(packageJsonRaw);
|
|
const zacVersion = packageJson.version;
|
|
|
|
const file = path.resolve(__dirname, 'projects/zt-console-lib/src/lib', 'ZAC_VERSION.ts');
|
|
fsExtra.writeFileSync(file,`export const ZAC_VERSION = {
|
|
"version": "${zacVersion}"
|
|
};
|
|
`, { encoding: 'utf-8' });
|