Difference between revisions of "GPG guide/Repository and Publishing"

From LibrePlanet
Jump to: navigation, search
Line 23: Line 23:
 
</pre>
 
</pre>
  
It's important to remember that the static/ directory is another repository and you must commit to it separately from enc.
+
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.
 
After running `git pull`, it's good to run `git submodule update` to get the latest static assets.

Revision as of 10:42, 22 July 2014

Checkout Out Project

The repository can be checked out via the following command: git clone git@vcs.fsf.org:enc.git --recursive

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:

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