Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Apr 29, 2024
2 parents 3980a82 + 1751b2d commit beea854
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
7 changes: 2 additions & 5 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def setup_details(self):
# fetch meta for repo from remote git server - traditional get-app url
elif is_git_url(self.name):
self.is_url = True
self._setup_details_from_git_url()
self.__setup_details_from_git()

# fetch meta from new styled name tags & first party apps on github
else:
Expand All @@ -116,7 +116,7 @@ def _setup_details_from_mounted_disk(self):
# If app is a git repo
self.git_repo = git.Repo(self.mount_path)
try:
self._setup_details_from_git_url(self.git_repo.remotes[0].url)
self.__setup_details_from_git(self.git_repo.remotes[0].url)
if not (self.branch or self.tag):
self.tag = self.branch = self.git_repo.active_branch.name
except IndexError:
Expand All @@ -131,9 +131,6 @@ def _setup_details_from_name_tag(self):
self.org, self.repo, self.tag = fetch_details_from_tag(self.name, using_cached)
self.tag = self.tag or self.branch

def _setup_details_from_git_url(self, url=None):
return self.__setup_details_from_git(url)

def __setup_details_from_git(self, url=None):
name = url if url else self.name
if name.startswith("git@") or name.startswith("ssh://"):
Expand Down
13 changes: 13 additions & 0 deletions bench/playbooks/roles/wkhtmltopdf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
force: yes
when: ansible_os_family == 'Debian'

- name: download wkthmltox Ubuntu 22
get_url:
url: https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
dest: /tmp/wkhtmltox.deb
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture != 'aarch64'

- name: download wkthmltox Ubuntu 22 arm64
get_url:
# wkhtmltox supports arm64 starting from 0.12.6
url: https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_arm64.deb
dest: /tmp/wkhtmltox.deb
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '22' and ansible_architecture == 'aarch64'

- name: download wkthmltox Ubuntu 20
get_url:
url: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion bench/utils/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def get_current_branch(app, bench_path="."):
from bench.utils import get_cmd_output

repo_dir = get_repo_dir(app, bench_path=bench_path)
return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
return get_cmd_output("git symbolic-ref -q --short HEAD", cwd=repo_dir)


@lru_cache(maxsize=5)
Expand Down

0 comments on commit beea854

Please sign in to comment.