summaryrefslogtreecommitdiff
path: root/pkgs/unofficial-homestuck-collection/0001-disable-git-rev-check.patch
blob: d08db5f9b5f252beffff35444d926b1b8dc3dfe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 6b75316ea085a654c53c59816caaac5b0b880f48 Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sun, 20 Jul 2025 11:53:51 -0400
Subject: [PATCH 1/3] disable git rev check

---
 vue.config.js | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index 04b61d3..559b119 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,27 +1,12 @@
 const webpack = require('webpack')
 const { execSync } = require('child_process')
 
-const git_branch = execSync('git rev-parse --abbrev-ref HEAD').toString()
-
 var build_info = {
-  'process.env.BUILD_BRANCH': JSON.stringify(
-    git_branch.trim()
-  ),
+  'process.env.BUILD_BRANCH': "@git_branch@",
   'process.env.BUILD_DATE': JSON.stringify(new Date().toISOString()),
   'process.env.BUILD_PLATFORM': JSON.stringify(process.platform),
-  'process.env.BUILD_GIT_REVISION': JSON.stringify(
-    execSync('git rev-parse HEAD').toString().trim()
-  )
-}
-
-try {
-  const git_remote = execSync(`git config --get branch.${git_branch.trim()}.remote`).toString()
-  const git_remote_url = execSync(`git config --get remote.${git_remote.trim()}.url`).toString()
-
-  build_info['process.env.BUILD_GIT_REMOTE'] = JSON.stringify(git_remote_url.trim())
-} catch (e) {
-  build_info['process.env.BUILD_GIT_REMOTE'] = JSON.stringify("(no remote)")
-  console.warn("No git remote")
+  'process.env.BUILD_GIT_REVISION': "@git_revision@",
+  'process.env.BUILD_GIT_REMOTE': "@git_remote@",
 }
 
 module.exports = {
-- 
2.50.0