Skip to content

Commit af64599

Browse files
author
Сосна Евгений
committed
Merge branch 'master' of github.com:xUnitFor1C/precommit1c
2 parents 5c0c899 + d06ab35 commit af64599

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

copy-to-hook.cmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@echo off
2+
3+
@echo copy current version in bootstrap https://github.com/xUnitFor1C/xdd-bootstrap-1C
4+
5+
xcopy .\ibService .\..\..\.git\hooks\ibService\ /Y /E /F
6+
xcopy .\pre-commit .\..\..\.git\hooks\ /Y /F
7+
xcopy .\v8Reader.epf .\..\..\.git\hooks\ /Y /F
8+
xcopy .\pyv8unpack.py .\..\..\.git\hooks\ /Y /F

pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
2-
echo "dddd"
2+
3+
echo "Start hooks before commit for v8unpack erf and epf"
34
python.exe .git/hooks/pyv8unpack.py

pyv8unpack.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ def get_path_to_1c():
2525

2626
cmd = os.getenv("PATH1C")
2727
if not cmd is None:
28-
return os.getenv("PATH1C")
28+
cmd = os.path.join(cmd, "1cv8")
29+
maxversion = max(list(filter((lambda x: '8.' in x), os.listdir(cmd))))
30+
if maxversion is None:
31+
raise Exception("not found verion dirs")
32+
cmd = os.path.join(cmd, maxversion + os.path.sep + "bin"+os.path.sep+"1cv8.exe")
33+
34+
if not os.path.isfile(cmd):
35+
raise Exception("file not found %s" %(cmd))
36+
37+
return cmd
2938

3039
#read config
3140
curdir = os.curdir
@@ -120,7 +129,7 @@ def decompile():
120129
if len(dataprocessor_files) == 0:
121130
exit(exit_code)
122131

123-
dirsource = os.path.abspath(os.path.join(os.path.curdir, "src"))
132+
dirsource = os.path.abspath(os.path.join(os.path.curdir, "plugins-source"))
124133
curabsdirpath = os.path.abspath(os.path.curdir)
125134
#pathbin1c = "C:\\Program Files\\1cv82\8.2.17.153\\bin\\1cv8.exe"
126135
#pathbin1c = "c:\\Program Files (x86)\\1cv8\\8.3.4.304\\bin\\1cv8.exe"

0 commit comments

Comments
 (0)