diff --git a/appveyor.yml b/appveyor.yml index a785c569..62db1543 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,4 +58,6 @@ artifacts: name: Zip - path: packaging\windows\*.exe name: Setup - \ No newline at end of file + +on_failure: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) \ No newline at end of file diff --git a/defines.py b/defines.py index b9777c00..011a50f7 100644 --- a/defines.py +++ b/defines.py @@ -36,7 +36,7 @@ def local_path(self): def repository_root(self): if self._repository_root is None: try: - if self.no_git: + if ('APPVEYOR' in os.environ) or self.no_git: self._repository_root = self.local_path else: self._repository_root = os.path.abspath(check_output(['git', 'rev-parse', '--show-toplevel']).rstrip()) @@ -49,7 +49,9 @@ def repository_root(self): def repository_version(self): if self._repository_version is None: try: - if self.no_git: + if 'APPVEYOR_REPO_COMMIT' in os.environ: + self._repository_version = os.environ['APPVEYOR_REPO_COMMIT'].rstrip() + elif self.no_git: if 'FREELAN_NO_GIT_VERSION' not in os.environ: raise RuntimeError(errstr='You must specify FREELAN_NO_GIT_VERSION when FREELAN_NO_GIT is specified.')