Skip to content

Commit

Permalink
Fix starting git process with a partial executable path, improve dock…
Browse files Browse the repository at this point in the history
…erfile
  • Loading branch information
jackra1n committed Jan 7, 2024
1 parent 38ee408 commit 78c14c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM gorialis/discord.py
FROM gorialis/discord.py:latest

WORKDIR /bot
VOLUME /bot/logs

COPY requirements.txt ./
RUN pip install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

Expand Down
4 changes: 2 additions & 2 deletions bot/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _set_properties(self, version_dict) -> None:
self.patch = self._calculate_patch()

def _calculate_patch(self) -> int:
return int(subprocess.check_output(['git', 'rev-list', f'{self.last_update}..HEAD', '--count']).decode('utf-8').strip())
return int(subprocess.check_output(['/usr/bin/git', 'rev-list', f'{self.last_update}..HEAD', '--count']).decode('utf-8').strip())

def _get_last_commit_sha() -> str:
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
return subprocess.check_output(['/usr/bin/git', 'rev-parse', 'HEAD']).decode('utf-8').strip()

0 comments on commit 78c14c0

Please sign in to comment.