GPG guide/Repository and Publishing
Checkout Out Project
The repository can be checked out via the following command:
git clone git@vcs.fsf.org:enc.git --recursive
. After checking out, make sure you are on the master branch of the repository.
NOTE: The --recursive option will checkout this projects submodule, which for this project is used for commiting static content into static.fsf.org. If you forget the --recursive option, you can get the submodule later with the following command: git submodule update --init
The static submodule
The static assets for the email self-defense guide are kept in another repository, enc-static. In order to add new files to it, i.e. infographic translations, commits must be made to this repository, and the updated submodule must be commited to the enc repository. The workflow resembles the following:
cd static/ # enter the enc-static repository git checkout master # the submodule is in a detached state, go to master HEAD touch img/es/donate.png # make a change git add img/es/donate.png git commit -m "es: Added donate image." git push cd .. # back to enc repository git add static git commit -m "Bump submodule." # Commit new version of static submodule git push
It's important to remember that the static/ directory is another repository and you must commit to it separately from enc. It is also important to maintain the proper order of operations, as demonstrated above. Do not push a commit to enc that bumps the submodule if the new commits to enc-static have not been pushed. Always push to enc-static first.
After running `git pull`, it's good to run `git submodule update` to get the latest static assets.
The Hooks
The repository has the following hooks:
- vcs.fsf.org:enc.git
- When master is pushed to, http://enc-dev0.fsf.org is updated.
- vcs.fsf.org:enc-static.git (a submodule of the vcs.fsf.org:enc.git, it is found in the static/ directory of its parent repository).
- When master is pushed to, http://static.fsf.org/nosvn/enc/enc-dev0
Pushing to the Live Instance
NOTE: Access to the live site is restricted, access is given on an as needed basis.
- Add the following remote repository:
git remote add live git@vcs.fsf.org:enc-live.git
- When you are ready to push to the live site, use:
git push live master
- Your changes will be then pushed to http://emailselfdefense.fsf.org