1. 29 Apr, 2021 1 commit
  2. 22 Mar, 2021 1 commit
    • Jakub Ružička's avatar
      refactor: get rid of compat.py35path · 878ef8f6
      Jakub Ružička authored
      shutil and os modules in python 3.5 doesn't accept pathlib.Path (yet).
      
      compat.py35path() wrapper was used to mark code which requires extra
      str() conversion on Python <= 3.5.
      
      Introduce new apkg.util.shutil35 wrapper module for selected shutil and
      os functions in order to address this without polluting code with
      redundant py35path/str conversions.
      
      apkg.compat was removed in favor of new shutil35 which can be easily
      removed in the future once Python 3.5 support is dropped.
      
      Fixes: #36
      878ef8f6
  3. 24 Feb, 2021 1 commit
    • Jakub Ružička's avatar
      refactor: new -O/--result-dir option · 656b20e4
      Jakub Ružička authored
      Following apkg commands got support for -O/--result-dir option to
      override directory where apkg puts resulting files:
      
      * get-archive
      * make-archive
      * srcpkg
      * build
      
      When result is cached elsewhere, it's automatically copied to
      --result-dir.
      
      This change required refactoring across apkg commands:
      
      * all commands and scripts now return list of all output files
      * all output files are cached
      * make commands and their options consistent with each other and --help
      * new apkg.lib.common module to contain common/shared code
      
      Related: #9
      656b20e4
  4. 28 Jan, 2021 1 commit
    • Jakub Ružička's avatar
      cache: automagically cache and reuse output files · 6a11c37f
      Jakub Ružička authored
      Following commands got support for automating cache and reuse of
      produced output files:
      
      * make-archive
      * get-archive
      * srcpkg
      * build
      
      Cache uses checksum of current project state as a key and also stores
      and validates cached files' checksums. Currently the project checksum is
      obtained using git magicks so the cache is only enabled for projects
      using git.
      
      Cache lives in pkg/.cache.json and it's updated automatically when
      a new archive/srcpkg/package is created or when invalid cache entry is
      requested.
      
      Caching can be disabled using new --no-cache option.
      
      Cache can be cleared by removing pkg/.cache.json file.
      
      Self test on make-archive is included.
      6a11c37f