I am working on a Debian server, where I installed bugzilla. According to the suggestions in the gitzilla-installation guidelines, I would like to integrate Gitzilla to a project on github.com, using the github.com-project as my central repo. Therefore, I am not quite sure, where to do the following steps:
Switch to the hooks directory (/path/to/repository/.git/hooks) and delete the post-receive and update hooks.
Link (or copy) the gitzilla provided hooks:
ln -s $(which gitzilla-post-receive) post-receive
ln -s $(which gitzilla-update) update
Moreover, I tested to choose my github.com-URL to integrate in the /etc/gitzillarc, but without success. PyBugz is installed, and I defined the link to bugzilla, the user_name and PW of the bugzilla-admin.
Best,
H.M.
https://github.com/your_repository.git/.git/hooks will be the path where you should execute the steps.
In case you have a bare repository, then https://github.com/your_repository.git/hooks would be the path.
Related
I want to get started developing my own packages. I am also adding version control via Github. I mainly develop on my Mac and a Windows laptop, but there is potential for me to develop on other machines down the line. My IDE of choice is PyCharm. I need to figure out where to place my packages both on Github and on my local machines so that my packages are always in sync regardless of where I am developing. Help??
First, let's clarify that git is the version control system, and Github is a platform for hosting git repositories (there are many other platforms aside from Github). You use git commands to manage your codes, and Github is where you store a copy of your codes.
By adding version control and putting a copy on Github, you've already taken the first step in managing your codes on different machines. All you need to do is to make sure the codes on Github is always the latest updated or maintained version.
Here's a sample workflow:
On machine 1 (Mac), clone a copy of the Github repo
Develop on machine 1
When you are satisfied with your changes, push your codes from machine 1 to Github
On machine 2 (Windows), clone a copy of the Github repo
Develop on machine 2
When you are satisfied with your changes, push your codes from machine 2 to Github
On machine 1, do a fetch to check for updates to the code
If there are updates, pull those changes to machine 1
Again, when done making changes, push them from machine 1 to Github
On machine 2 again, fetch and pull changes
Repeat this fetch-pull-push- cycle for all machines
Basically, you'll need to make sure that on wherever machine you are, when you are done, you should always push those changes to the remote (Github). So that other machines, can fetch and pull those changes and continue where you left off.
UPDATE (based on comment):
Once you've got the workflow for your package source codes, next is to package them like any other regular Python package and install them to your site-packages (either directly for your system or preferably in a virtual environment).
I recommend taking a look at the Python docs on Packaging Python Projects which uses setuptools to make your package compatible with pip.
Here's a sample workflow:
git clone <mypackage#github.com> # or git pull if you already cloned it before
cd mypackage
pip install -r requirements.txt
pip install -e . or pip install --user -e .
That last step will install your package to your site-packages folder, like any other pip-compatible package (assuming you've setup your setup.py file properly). If you are using virtual environments, you'll have to activate the virtual env first, then install your package there.
If you are not going to do any modification on the source code, and you just want to install the package on a specific machine, then you can also specify the Github URL to pip:
$ pip install -e git+https://git.repo/some_pkg.git#egg=SomeProject # from git
Lastly, if you are planning to upload this package to PyPi, check out the docs on Uploading the distribution archives. This just adds an extra step to your workflow of uploading your package to PyPi and then doing pip install from there next time.
I am hosting a personal repo for my friends. I am using the cyman script to generate and maintain the repo. I have my repo hosted at http://184.95.54.221/ The problem is that on the iphone when you go into the repo you cannot see the packages and the packages cannot be found. However they are still "listed". You're welcome to install the repo to look.
Make sure your repo has the file called packages.gz
You can create it using the command
dpkg-scanpackages -m . /dev/null >Packages
Your 'Packages' file is invalid. Name, Author, Depiction, Icon - these fields has indentation at the beginning of a line. Remove it and Cydia will see your packages.
I started today working with gamejs for a small project. I saw that most project are repository files on github dot com, so I downloaded the github for windows and the git bash.
Then I used git bash to clone gamejs repository. I proceed the same with some repository stuff. However, it seems that I forget to install something... because I cannot start the server, I have gjs-server.sh or .cmd missing. The bash doesnt recognize the command. What will I do?
Since you cloned the code instead of downloading the release tarball you need to build GameJS first:
Change into the GameJs directory
cd gamejs
Get all needed submodules with git:
git submodule init git submodule update
Compile RingoJs:
ant -f ./server/ringojs/build.xml jar
EDIT: Prior to building you need to install Apache Ant build tool. Since it is a Java application to install it just download the binary distribution from their download page and unzip it.
Jekyll is processing my _plugins folder fine on my local machine (OS X 10.7.4, ruby 1.9.3), but it's not processing them on the server (Ubuntu 12.04, ruby 1.9.3). Both have the same version of Jekyll installed (0.11.2).
I'm trying to use the generate_sitemap plugin, here.
I'm deploying via git and the post-receive hook, which looks like this:
#!/bin/bash -l
GIT_REPO=/my_repo.git
TMP_GIT_CLONE=/my_temp_folder/
PUBLIC_WWW=/my_public_folder/
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
I am seeing this error when I deploy:
remote: /home/ed/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
But, from what I've read, that's a Maruku warning and has nothing to do with the plugins.
Anybody have any ideas about what I can try to figure this out? I'm at a bit of a loss.
It's very hard to debug with Jekyll, but it's a great tool !!!
I assume you have more than one plugin in your _plugins folder.
So maybe one or some of your plugins , cause the problem.
If I'm right, you can do the following :
Kill your Jekyll
Create a backup of your plugins in another location (not in _plugins
folder).
Leave just one plugin in your _plugins folder and start Jekyll.
If it works , copy another plugin to the _plugins folder, until you
find the one which fails the Jekyll.
When you find it, you can add debug printouts to the problematic plugin (that's what I did).
Something like :
puts "before .... "
I have built the http://www.cloudifysource.org/ only with Jekyll and you can find and use lots of our useful examples in our GitHub repo : https://github.com/CloudifySource/cloudifysource.github.com
I had the same problem with Jekyll not loading plugins when called from the post-receive hook.
As is mentioned in the comments above, changing the current working directory to $TMP_GIT_CLONE does the trick.
You don't have to change anything in _config.yml.
#!/bin/bash -l
GIT_REPO=/my_repo.git
TMP_GIT_CLONE=/my_temp_folder/
PUBLIC_WWW=/my_public_folder/
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE # move to the temp dir
jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW
cd # move back to allow deletion
rm -Rf $TMP_GIT_CLONE
exit
This is a real head-scratcher seeing as executing the original post-receive hook manually as the git user works just fine... Anyway, Jekyll is now loading plugins on my server and hopefully making this a proper answer will help others to find this solution.
Lately, I start to build https://github.com/alswl/code-standards-jekyll with jekyll.
I write two plugins in _plugins, and I found it was hard to debug.
At first, I use puts "balabala" to debug, it seems work.But once I met problem that didn't generate anything in the _site folder, and there was no 'balabala' in the console, I was panic.
After I read the jekyll source, I try to set auto=false in _config.yml, running jekyll will produce some debug trace stack error. Thank godness.
So, ues auto=false will help you to debug plugins.
I have jekyll blog up and running locally. I am not sure how to push the content to slicehost. They have an instruction page but I am not able to follow the instruction.
I have all my content on github. Just need to know how to make post-update hook work?
To deploy a generated Jekyll site, you just need to copy the contents of the local _site directory to the appropriate remote directory on your server (often public_html, but it depends on the server configuration).
Personally, I think the easiest way is to just use rsync, assuming you can use rsync with your server. Then it's as simple as executing the command
$ rsync -avz --delete _site/ user#host:/path/to/web/root
to deploy your site. For my Jekyll-based sites, I encapsulate this in a Rake task so I can just do
$ rake site:deploy
to copy the site to the server.
If you can't use rsync, you can always transfer the _site directory via FTP, which is also pretty easy to do (and with a bit of Ruby scripting, can be automated using Rake as well).
You can use Git, as noted in the Jekyll docs. You will have to have Git installed on your server, and access to using it. If that's the case, you have to create a bare Git repo on your server. In the bare repo, you then create a post-update hook to check out the latest copy of the site. You do this by creating a script at $BARE_REPO/hooks/post-update with contents like the following (as noted here):
#!/bin/sh
unset GIT_DIR && cd /path/to/web/root && git pull
You then clone the bare repository to your web root, like so:
$ cd /path/to/web/root
$ cd ..
$ rm -rf root
$ git clone /path/to/bare/repo.git root
As you can see, it's often easier to use rsync or FTP instead of Git.