glyphix 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/glyphix.js +8 -4
  2. package/package.json +1 -1
package/bin/glyphix.js CHANGED
@@ -199,7 +199,7 @@ var GxGenerate = class {
199
199
  target: "node14",
200
200
  // 目标平台设置为最新 ECMAScript
201
201
  define: {
202
- // 'process.env.GLYPHIX_APP_VERSION': `"${this.getGitVersion()}"`,
202
+ "process.env.GLYPHIX_APP_VERSION": `"${this.getGitVersion()}"`,
203
203
  ...this.loadEnv()
204
204
  },
205
205
  nodePaths: [(0, import_node_path3.resolve)(this.sourceRoot, "..", "node_modules")],
@@ -296,9 +296,13 @@ var GxGenerate = class {
296
296
  });
297
297
  });
298
298
  }
299
- // getGitVersion() {
300
- // return execSync('git rev-parse HEAD').toString().trim();
301
- // }
299
+ getGitVersion() {
300
+ try {
301
+ return (0, import_node_child_process.execSync)("git rev-parse HEAD").toString().trim();
302
+ } catch (err) {
303
+ return "not git version";
304
+ }
305
+ }
302
306
  build() {
303
307
  const curDir = process.cwd();
304
308
  this.installDependencies().then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glyphix",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "main": "lib/index.js",
5
5
  "types": "types/index.d.ts",
6
6
  "files": [