[Glass] Migrating to github 2
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Mon Jul 11 11:25:44 PDT 2016
Hello Bruno,
There are some adjustments to the process ... in-lined below
On 07/11/2016 09:14 AM, BrunoBB via Glass wrote:
> Dale,
>
> About a year ago we had a conversation on github migration. Now i have a
> stable version of my application i want to migrate the code to github.
>
> Back then the step were these: (are these steps still correct to migrate to
> github ?)
> (the step 2. is refering to the gemstone host or the windows tode client ?
> in which machine perform the file copy and git init?)
>
> 1. create GitHub project (done:
> https://github.com/brunobuzzi/OrbeonPersistenceLayer)
> 2. create a local git repository (using `git init` in an empty directory
> called
> OrbeonPersistenceLayer). In the dev branch of GsDevKitHome, the
> place to put shared
> git repositories is $GS_HOME/tode/sys/local/git (using bash):
>
> mkdir $GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer
> mkdir $GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer/repository
This has changed - in fact I think the previous discussion was probably
based upon gsDevKitHome. For GsDevKit_home, I've settled on
$GS_HOME/shared/repos as the standard location for git repositories:
mkdir $GS_HOME/shared/repos/OrbeonPersistenceLayer
mkdir $GS_HOME/shared/repos/OrbeonPersistenceLayer/repository
>
> 3. copy each of the active packages from the SS3 repo to your local git
> repo:
>
> mc copy Orbeon_Persistence_API-BrunoBB-0.039
> http://ss3.gemtalksystems.com/ss/OrbeonPersistenceAPI
> filetree://$GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer/repository
>
> mc copy Orbeon_Persistence-BrunoBB-0.019
> http://ss3.gemtalksystems.com/ss/OrbeonPersistenceAPI
> filetree://$GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer/repository
So the filetree path will change here as well:
mc copy Orbeon_Persistence_API-BrunoBB-0.039 http://ss3.gemtalksystems.com/ss/OrbeonPersistenceAPI filetree://$GS_HOME/shared/repos/OrbeonPersistenceLayer/repository
mc copy Orbeon_Persistence-BrunoBB-0.019 http://ss3.gemtalksystems.com/ss/OrbeonPersistenceAPI filetree://$GS_HOME/shared/repos/OrbeonPersistenceLayer/repository
>
> 4. create a BaselineOfOrbeonPersistenceLayer class:
>
> cls create BaselineOfOrbeonPersistenceLayer BaselineOf
> BaselineOfOrbeonPersistenceLayer
> cls protocol --add=BaselineOfOrbeonPersistenceLayer baseline
> browse class BaselineOfOrbeonPersistenceLayer
>
> 5. add a baseline: method to BaselineOfOrbeonPersistenceLayer that looks
> something like the following (no tODE command - sorry:):
>
> baseline: spec
> <baseline>
> spec
> for: #'common'
> do: [
> spec
> package: 'Orbeon_Persistence';
> package: 'Orbeon_Persistence_API' with: [ spec requires:
> 'Orbeon_Persistence' ];
> yourself.
> spec
> group: 'default' with: #('Core');
> group: 'Core' with: #('Orbeon_Persistence_API');
> yourself ].
>
> 6. create a BaselineOfOrbeonPersistenceLayer package
>
> mc create BaselineOfOrbeonPersistenceLayer
>
> 7. associate the filetree repo with the new package:
>
> mr add
> filetree://$GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer/repository
> BaselineOfOrbeonPersistenceLayer
path change here, again:
mr add filetree://$GS_HOME/shared/repos/OrbeonPersistenceLayer/repository BaselineOfOrbeonPersistenceLayer
>
> 8. save the baseline to the repo:
>
> mc commit BaselineOfOrbeonPersistenceLayer `initial baseline and
> packages`
>
> 9. Create the project entry:
>
> project entry --baseline=OrbeonPersistenceLayer
> --repo=filetree://$GS_HOME/tode/sys/local/git/OrbeonPersistenceLayer/repository
> /sys/stone/projects
path again:
project entry --baseline=OrbeonPersistenceLayer --repo=filetree://$GS_HOME/shared/repos/OrbeonPersistenceLayer/repository /sys/stone/projects
>
> 10. Load the project (testing your baseline):
>
> project load OrbeonPersistenceLayer
>
> 11. Write the new baseline to the filetree repository and do a git commit:
>
> project commit --git --message=`initial commit for project packages
> and baseline` OrbeonPersistenceLayer
> project list
>
> 12. Hook up your local git repo to your github repo something like the
> following (follow github instructions to get it exactly right):
>
> git remote add origin
> [hidden email]:brunobuzzi/OrbeonPersistenceLayer.git
> git push origin master
For GsDevKit_home I would an additional optional step where you would
add a $GS_HOME/sys/local/gsdevkit_bin/cloneUpdate script. I've attached
a copy of the script.
If you install the script in $GS_HOME/sys/local/gsdevkit_bin it will be
called whenever you execute `$GS_HOME/bin/updateGsDevKit -s` ... I've
found this particularly convenient if I have multiple GsDevKit_home
installations (work computer and home laptop) that I want to keep
up-to-date ... It also makes more sense when you get to the point where
you have multiple projects like Seaside and your own project so that you
can update the git repos using a script instead of manually ...
>
>
> ... and I think that's it... Let me know how things work for you. I've
> create a gist on github[4] with all of the tode comands extracted out
> (source code is in middle) for easy copy/paste.
>
> Dale
>
> [1] https://github.com/dalehenrich/tode/issues/18
> [2]
> https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md#create-baseline
> [3]
> https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md
> [4] https://gist.github.com/dalehenrich/001ab961bd599b3efac1
> _______________________________________________
>
>
and I think that should be it ... let me know if you have problems ..
I've updated the gist[2] with the changed paths
We have an open issue for GsDevKit_home[1] that I will add this email
trail to ...
[1] https://github.com/GsDevKit/GsDevKit_home/issues/91
[2] https://gist.github.com/dalehenrich/001ab961bd599b3efac1
-------------- next part --------------
#! /usr/bin/env bash
theArgs="$*"
source ${GS_HOME}/bin/private/shFeedback
start_banner
usage() {
cat <<HELP
USAGE: $(basename $0) [-h] client|server|both
Update OrbeonPersistenceLayer. Called when '\$GS_HOME/bin/updateGsDevKit -s' script executed.
OPTIONS
-h
display help
EXAMPLES
$(basename $0) -h
$(basename $0)
HELP
}
source ${GS_HOME}/bin/defGsDevKit.env
while getopts "h" OPT ; do
case "$OPT" in
h) usage; exit 0;;
*) usage; exit_1_banner "Uknown option";;
esac
done
shift $(($OPTIND - 1))
if [ $# -gt 0 ]; then
${GS_SYS_DEFAULT}/gsdevkit_bin/cloneUpdate $*
fi
source ${GS_HOME}/bin/private/gitFunctions
pushd ${GS_SHARED_REPO} >& /dev/null
if [ -d "OrbeonPersistenceLayer" ] ; then
updateClone master origin ${GS_SHARED_REPO}/OrbeonPersistenceLayer
fi
popd >& /dev/null
exit_0_banner "...finished"
More information about the Glass
mailing list