scriptotek / alma-slipsomat

Tool for syncing Alma letters XSL files with a local folder
MIT License
15 stars 10 forks source link

Option to work with sandbox? #29

Open daniels opened 7 years ago

daniels commented 7 years ago

Hi,

Thanks for this fantastic tool. Was looking for some help on how to handle Alma letters in Git, but this was much more than I would have hoped for.

But I struggle to use the tool with our (premium) sandbox in parallell to the production environment. Do you have any workflow in place for this?

So far I've been trying to move slipsomat.cfg and status.json around to work with one at a time, but got stuck when somehow the status.json got out of sync with the actual content in the sandbox, so I have to manually confirm every file. Another option would probably be to have two separate working copies where one is configured to work with the sandbox. But I would need to protect status.json from being updated from the sandbox copy.

Do you work with this tool with the sandbox, and if so, how?

danmichaelo commented 7 years ago

Hi, glad you like it! My current strategy is to have one folder/repo for the production environment and another for sandbox. This is not set in stone though

daniels commented 7 years ago

Thanks for the answer, Dan. I guess a separate checkout in a different directory might be good enough.

When I opened the case my initial idea was to suggest a third checksum in the status.json file for the sandbox, and the possibility to have both environments configured side by side in slipomat.cfg, but as I was writing I realized that I hadn't really tried all the possibilities of the current setup.

By the way, concerning how to avoid checking in status.json from the sandbox working copy by mistake, I found out that there is a git command that seems to help with that. In my sandbox git repo I executed git update-index --skip-worktree status.json and now git will not list it as changed nor allow it to be added to the index.

I'll try this out for some time and see if it works alright.

Thanks again both for the utility and your answer.

(Late edit: Changed the suggested git-command to use --skip-worktree rather than --assume-unchanged.)

ewinge commented 7 years ago

I guess it should also work to have two different branches in the same repo? I haven't tried myself though.