amtrack / force-dev-tool

[DEPRECATED] Command line tool supporting the Force.com development lifecycle
MIT License
108 stars 37 forks source link

Other approch to create change sets #127

Closed dieffrei closed 6 years ago

dieffrei commented 6 years ago

I just started to use a diferent approach to generate changesets: Instead of you "git diff master feature". I start my deployment pipeline with "git diff HEAD~2 HEAD --no-renames | force-dev-tool changeset create feature-merge -f" It's like a git diff [my_curren_version] [my_previous_version] on the same branch, it's seems more robust than to specified the branch names @amtrack let me know your thoughts;

dieffrei commented 6 years ago

My current deployment pipeline: https://gist.github.com/dieffrei/f35043e3d89bfeadda0778be9759b39b

amtrack commented 6 years ago

It should not make a difference to force-dev-tool changeset create whether your git diff command uses branch names or expressions for referencing commits on the same branch.

git diff master develop is just an example in the README.

Disclaimer: You might run into problems, when your diff command is based on uncommited changes - but this does not seem to be the case here

Given your develop pipeline with Bitbucket Pipelines: git diff master develop might have not worked in CI because only one branch is available locally be default.

↪️ git diff origin/master develop ... should do the trick then. Of course it depends on what diff you want to consider for the deployment. HEAD~2 HEAD shows the diff generated by the last two commits. Is that what you want to achieve?

In the worst case it might be that your CI solution does not have fully cloned the repository (git clone --depth N) and you only have a number of recent commits on the same branch available.

I'm closing this issue as i think this is unrelated to force-dev-tool.