Helps create packages for deployment, can be used to create a deployment package for files changed between two git tags or two git Head revisions like HEAD³ and HEAD or between commit ids.
the resulting zip can be exploded on to production and the delete script is run to clean up stale files.
how does the script work ?
- The script gets the git diff between 2 Tags or HEADS or Commit IDs to give a list of all files(with paths) there were either added, modified or deleted.
- It checks the results for files that were added or modified and pushes them to file_list.
- It also checks the results for files that were marked as deleted and pushes them to delete_list.
- If the lists are not empty it then proceeds to create a folder with the timestamp as the name.
- Using the files from file_list and git archive it creates a . zip under the above folder.
- Finally dumps the file paths from delete_list to a txt file under the above folder.