1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 10:15:12 +03:00
aports/community/zigbee2mqtt/ungit.patch
2022-11-20 01:36:54 +01:00

43 lines
1.4 KiB
Diff

--- a/lib/util/utils.ts
+++ b/lib/util/utils.ts
@@ -46,34 +46,9 @@
}
async function getZigbee2MQTTVersion(includeCommitHash=true): Promise<{commitHash: string, version: string}> {
- const git = await import('git-last-commit');
const packageJSON = await import('../..' + '/package.json');
- if (!includeCommitHash) {
- return {version: packageJSON.version, commitHash: null};
- }
-
- return new Promise((resolve) => {
- const version = packageJSON.version;
-
- git.getLastCommit((err: Error, commit: {shortHash: string}) => {
- let commitHash = null;
-
- if (err) {
- try {
- commitHash = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', '.hash'), 'utf-8');
- } catch (error) {
- /* istanbul ignore next */
- commitHash = 'unknown';
- }
- } else {
- commitHash = commit.shortHash;
- }
-
- commitHash = commitHash.trim();
- resolve({commitHash, version});
- });
- });
+ return {version: packageJSON.version, commitHash: null};
}
async function getDependencyVersion(depend: string): Promise<{version: string}> {
--- a/test/utils.test.js
+++ b/test/utils.test.js
@@ -11 +11 @@
- it('git last commit', async () => {
+ it.skip('git last commit', async () => {