-
Notifications
You must be signed in to change notification settings - Fork 435
zArchive_GitTarball
If you need to share a tarball file for a specific branch, this can be accomplished easily with git. If you are already in the branch you wish to share, and if you wish to share the entire source tree, then, from the top-level psi4 directory, use a command like this:
git archive --prefix=psi4.0b1/ --format=tar 4.0b1 | gzip >../psi4.0b1.tar.gz
-
--prefix=psi4.0b1/
-- prefix every file in the new tarball with this path. You need the trailing slash. -
--format=tar
-- process the files through the tar command -
4.0b1
-- the branch to make a tarball from -
| gzip >../psi4.0b1.tar.gz
-- pipe the result of the git command through gzip creatingpsi4.0b1.tar.gz
in the parent directory.
If you are not already in the branch you wish to share, then make sure to precede the branchname with origin/
, e.g., --format=tar origin/4.0b1
in the example above.
To share only some particular subdirectory (e.g., the basis set data), run this command from within that directory (e.g., psi4/lib/basis).
-
In
configure.ac
in the new branch, bump up the version numberdefine([psi_version],[4.0.0-beta4])
-
In
configure.ac
in the master branch, bump up the version numberdefine([psi_version],[4.0.0-beta4+])
-
In the new branch, check in a
configure
file so users don't need autoconf. -
In the new branch in
doc/sphinxman/source/conf.py.in
, edit the following. TheSUBSTITUTE_HERE
should be the flat repo created in the next section.# Uncomment these lines for named releases #version = 'beta4' #release = 'beta4' # Uncomment these lines for named releases #extlinks = {'source': ('https://github.com/psi4/SUBSTITUTE_HERE/blob/master/%s', 'psi4/'), # 'srcsample': ('https://github.com/psi4/SUBSTITUTE_HERE/blob/master/samples/%s/input.dat', ''), # 'srcbasis': ('https://github.com/psi4/SUBSTITUTE_HERE/blob/master/lib/basis/%s.gbs', ''), # 'srcplugin': ('https://github.com/psi4/SUBSTITUTE_HERE/blob/master/plugins/%s', ''), # 'srcdb': ('https://github.com/psi4/SUBSTITUTE_HERE/blob/master/lib/databases/%s.py', '') }
For releases, we want the source code to be publicly accessible but not its history (which would include removed files). We also want tickets to track across versions, so every new version should be checked into the psi4/psi4release
repository. The steps taken for beta5 are as follows.
-
Package up the target branch into a tarball, directions above. This captures only files under git control. Unpack the tarball and rename the psi4 root directory to
psi4release
.>>> tar -xvfz psi4.0b5.tar.gz >>> mv psi4.0b5 psi4release
-
Remove the
README.rst
associated with the developers' GitHub site and replace it with the users' README.md, incrementing the links as necessary.>>> rm README.rst >>> vi README.md
-
Assume the identity of
psi4
to git so github repo will look like it's checked in bypsi4
and not you.>>> git config --list user.name=Lori Burns user.email=lori.burns@gatech.edu credential.helper=osxkeychain >>> git config --global user.name "psi4" >>> git config --global user.email psi4aiqc+github@gmail.com >>> git config --list user.name=psi4 user.email=psi4aiqc+github@gmail.com credential.helper=osxkeychain
-
Initialize a git repository in the directory and add all the files and directories.
>>> git init >>> git add . >>> git commit
-
Look at the repo history and confirm that only one commit is present.
>>> git log commit 47b23b147779c39cc29e25744edb16877dee4e30 Author: psi4 <psi4aiqc+github@gmail.com> Date: Tue Jul 2 19:31:20 2013 -0400 sourceforge psi4.0b5.tar.gz contents
-
Add the GitHub
psi4/psi4release
repo as a remote.>>> git remote add origin https://github.com/psi4/psi4release.git >>> git remote -v origin https://github.com/psi4/psi4release.git (fetch) origin https://github.com/psi4/psi4release.git (push)
-
Force push the repository to GitHub. This will wipe the git history and replace the codeset with an entirely new flat code set.
>>> git push -u --force origin master