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 glob
|
||||
import datetime
|
||||
import subprocess
|
||||
|
||||
def get_current_git_branch():
|
||||
with open("../.git/HEAD", "r") as f:
|
||||
head_file = f.readlines()
|
||||
current_branch = head_file[0].split()[1].split("refs/heads/")[1]
|
||||
p = subprocess.Popen("git branch -a --contains | grep remote | cut -d'/' -f3 ", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
stdout, stderr = p.communicate()
|
||||
|
||||
current_branch = stdout.strip().decode('utf-8')
|
||||
return current_branch
|
||||
|
||||
def render(helpers):
|
||||
|
|
Loading…
Add table
Reference in a new issue