I've tried several ways to skip ci but it doesn't work.
git tag -a $NEXT_TAG -m "Bump version --skip-ci"
git tag -a $NEXT_TAG -m "Bump version [skip ci]"
Please help me out, thanks.
Skipping builds triggered from tags is currently not supported by Codeship.
Related
What is the best practice of automation of master merge?
Right now we are doing it manually. Should we do it from the CD(vsts) pipeline using a merge task? What happens in case of a merge failure?
This is the merge task we have found in the marketplace. Which is not working as expected.
https://marketplace.visualstudio.com/items?itemName=dtzar.git-merge
You can merge other branches into master branch automatically by Powershell script. Details as below:
Add a Powershell task in the end of the release definition, with the scripts:
git clone https://<alternate username>:<Alternate password>#account.visualstudio.com/project/_git/reponame repo
cd repo
git checkout $(BUILD.SOURCEBRANCHNAME)
git checkout master
git merge $(BUILD.SOURCEBRANCHNAME) -X ours -m 'merge $(BUILD.SOURCEBRANCHNAME) into master'
git push origin master
Note: for the workflow, there mainly has no conflicts for merging branches into master. the -X ours option for git merge is using the master version if there has conflicts. And you can also use -X theris instead to make the conflicts use the source branch's version.
I have gone through github documentation and not able to find how to get Github Repository's committees and their commit counts. Does anybody have idea about the same ?
You should go to check GitHub Developer API
https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts
Go to specific branch and fire follow command :
git shortlog -s -n
git shortlog -s
git shortlog -n
git shortlog
Hope this will help you.
I have a script to merge one branch to other and I am using below commands in the script. I am passing input as trunk name, working branch, source branch
How can I modify these commands if I have to merge branch to HEAD(trunk)?
cvs -d $cvs_root update -j$working_branch -j $source_branch
cvs -d $cvs_root commit -m "Merging ${source_branch} branch to ${working_branch} branch"
I assume you've tried "HEAD" and it doesn't work?
I've found with CVS, I never quite know if a command will interpret HEAD as "main trunk" or more rarely as "tip the current branch".
As a workaround, you could always tag HEAD and then use the tag.
When making a GitHub commit, how do I tag it using the git command-line options before pushing it to remote repo?
Can something like this be done?
git commit -m 'first commit' -tag -a v0.0.1 -m "1st release"
AFAIK, you cannot commit & tag in one command.
git commit -m "prepare for v1.0.0 release"
git tag v1.0.0
git push origin master --tags
All you can do is connect commands via &&:
git commit -m "prepare for v1.0.0 release" && git tag v1.0.0 && git push origin master --tags
Can I deploy directly from GitHub to my (debian linux) server? Is there a way of transmitting code from GitHub to my server automatically after each commit? And also manipulating a config file?
Clone the repository on server, Run a cronjob on the server every 1 or 2 minutes(or any interval depending on the frequency of your commits) and update the repo. That should be enough. But that's not advisable on the production server. You could do it on testing or staging server though.
Bibhas' answer above is correct although, if you're not the only person collaborating on the repository, you may want to consider using git tags to indicate release-able code and trigger the update only when a new tag appears.
To do this, tag your latest commit on your dev machine and push it:
git tag -a v1.0 -m"Initial tag"
git push origin --tags
Then, on your server:
git remote update && git checkout v1.0
Then, your cron script should do the following:
Get the latest from Github:cd $REPO && git remote update
Get the ref of the current HEAD (assumes you are ONLY checking out to tags):current=$(git rev-parse HEAD)
Get the ref of the latest tag:latest=$(git rev-list --tags | head -1)
And finally, if $current is not equal to $latest, check out the latest tag:git checkout $(git tag --points-at $latest)