Blog


What was I thinking ?

Git client for iOS

Today I noticed via http://onethingwell.org that there is now a native Git client for iOS.

The client is called Working Copy and is available in the App Store.

I’m actually writing this blog post in it right now as a test.

It even supports uploading photos.

Thumbs up

Once I commit (free) and push (needs app purchase) A Travis build is triggered that should result in Awestruct rendering and publishing this nice blog.

What is great by working copy is that it integrates with iOS 8 new feature of sharing and editing services so you can use it from and with any app.

Making it very interesting for on the go blogging and quick fixes.

/max

Comments


travis-ci with password only rsync

I finally got Travis working with my website.

The challenge I had was that one.com for some weird reason only allow rsync via passwords over ssh, not public/private keys.

This does not just work outside the box since rsync over ssh will under normal circumstances require a user to type in the password.

Luckily there is this little tool called sshpass that can help.

The following describes how to get all this to work together in Travis.

Setup travis.yml

In my .travis.yml I did the following:

language: ruby
bundler_args: "--without development --path .bundle"
rvm:
- 2.2.0
addons:
  ssh_known_hosts: ssh.xam.dk  (1)
branches:
  only:
  - master
before_script:
- sudo apt-get install -qq sshpass (2)
script: rake travis (3)
env:
  global:
    secure: fpWVLgbveBCXlsXX7ef06qi7GrizwAE5MFq5pKH9G5AMFAdFL4xQxNOmeemRZ5fnMAn8LQUrA8otxwjiiq2RangRC9E11fBChEKC5V+FewBzsHONqkSTzKd6oAbmLynUizpXDofhVxIfRhtP03lfEDufzly4WaVDyoLJicvy9aM= (4)
1 Add your host to ssh_known_hosts to avoid 'Host key verification failed' error
2 Install sshpass before starting the build
3 Run rake script that does the actual rsync
4 Created secure variable by running travis encrypt XAMSSH=secretpassword --add

Travis rake task

And then in the Rakefile I added my travis task that does the actual rsync:

desc 'Task to be used on travis-ci'
task :travis do
  run_awestruct("-P production -g --force")

  puts "## Deploying website via rsync"
  success = system("sshpass -p $XAMSSH rsync -rvc --delete  --exclude coppermine --stats --exclude update _site/ xam.dk@ssh.xam.dk:/www") (1)

  fail unless success
end
1 The important part is sshpass -p $XAMSSH which uses the encrypted value from travis.

Voila - now my website will get automatically built with awestruct and synchronized with rsync even though one.com don’t like to provide more secure private/public keys.

Comments