cooperspencer / gickup

https://cooperspencer.github.io/gickup-documentation/
Apache License 2.0
955 stars 33 forks source link

Strange folder creation issue #186

Closed kenlasko closed 9 months ago

kenlasko commented 9 months ago

I'm taking advantage of multiple source/destination pairs in a single config file. It works very well for backing up my Github repos to a local destination, except for one strange issue. The second backup path is appended to the first backup path. Example:

First Destination Path: backup/bare Second Destination Path: backup/full

The first backup goes to "backup/bare" The second backup goes to "backup/bare/backup/full"

If I specify the full path, it works fine. So, it's a pretty minor bug, but one that might cause some grief to someone someday.

Conf.yml

    source:
      github:
        - token_file: /gickup/tokens/github-token

    destination:
      local:
      - path: backup/bare
        structured: true
        zip: true
        keep: 7
        bare: true

    ---
    source:
      github:
        - token_file: /gickup/tokens/github-token

    destination:
      local:
      - path: backup/full
        structured: true
        zip: true
        keep: 7
        bare: false
cooperspencer commented 9 months ago

Thanks for this issue. I change once into the directory and never go back out again, which caused this weird structure. I fixed it in https://github.com/cooperspencer/gickup/tree/fix_path_clone Can you compile that branch and test it?

cooperspencer commented 9 months ago

or just download it from here https://github.com/cooperspencer/gickup/actions/runs/7051483578

kenlasko commented 9 months ago

That was fast! I'm in the middle of deploying Gitea (using your tool to sync from Github). When I'm done that, I'll look into how I can test this out.

cooperspencer commented 9 months ago

I just pushed a new release with the fix for the weird directory structure.