Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Git deployment strategy with git archive #451

Merged
merged 1 commit into from
Dec 30, 2015

Conversation

swalkinshaw
Copy link
Member

Currently the deployment process looks like this:

  1. Clone the repo into the source dir
  2. Copy the source dir into a new release dir
  3. Optionally move the repo_subtree_path directory to the release root
  4. Optionally remove unwanted dirs in the new release

This process leads to some complications and bugs. By copying the entire
repo into the release dir and then moving the subtree, other directories
are left behind that you manually need to clean up.

There can also be conflicts if your subtree directory contains
directories with the same name as directories in the repo's root.

The new process looks like this:

  1. Clone the repo into the source dir
  2. Run git archive to populate the new release dir

git archive already supports subtrees and through .gitattributes, other files/folders can be excluded.

@swalkinshaw
Copy link
Member Author

Docs: roots/docs#13

Currently the deployment process looks like this:

1. Clone the repo into the `source` dir
2. Copy the `source` dir into a new release dir
3. Optionally move the `repo_subtree_path` directory to the release root
4. Optionally remove unwanted dirs in the new release

This process leads to some complications and bugs. By copying the entire
repo into the release dir and then moving the subtree, other directories
are left behind that you manually need to clean up.

There can also be conflicts if your subtree directory contains
directories with the same name as directories in the repo's root.

The new process looks like this:

1. Clone the repo into the `source` dir
2. Run `git archive` to populate the new release dir

`git archive` already supports subtrees and through `.git_attributes`,
other files/folders can be excluded.
swalkinshaw added a commit that referenced this pull request Dec 30, 2015
Improve Git deployment strategy with git archive
@swalkinshaw swalkinshaw merged commit 1337fcf into master Dec 30, 2015
@swalkinshaw swalkinshaw deleted the deploys-use-git-archive branch December 30, 2015 04:16
@jawngee
Copy link
Contributor

jawngee commented Feb 20, 2016

This doesn't copy git submodules in your repo.

@retlehs
Copy link
Member

retlehs commented Feb 20, 2016

@jawngee well, you shouldn't be using git submodules. not sure why you're commenting on this considering you already opened a thread on discourse and haven't replied to my question on there.

https://discourse.roots.io/t/submodules-weirdness/5981

@roots roots locked and limited conversation to collaborators Feb 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants