mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix error on generate helper script
This commit is contained in:
parent
bbb68e8ef9
commit
146537dcc1
1 changed files with 4 additions and 3 deletions
|
@ -3,12 +3,13 @@
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
import datetime
|
import datetime
|
||||||
|
import subprocess
|
||||||
|
|
||||||
def get_current_git_branch():
|
def get_current_git_branch():
|
||||||
with open("../.git/HEAD", "r") as f:
|
p = subprocess.Popen("git branch -a --contains | grep remote | cut -d'/' -f3 ", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
head_file = f.readlines()
|
stdout, stderr = p.communicate()
|
||||||
current_branch = head_file[0].split()[1].split("refs/heads/")[1]
|
|
||||||
|
|
||||||
|
current_branch = stdout.strip().decode('utf-8')
|
||||||
return current_branch
|
return current_branch
|
||||||
|
|
||||||
def render(helpers):
|
def render(helpers):
|
||||||
|
|
Loading…
Add table
Reference in a new issue