First, fetch the latest upstream and build version 0.22:
git fetch --tags
git checkout HEAD Gopkg.lock
git checkout v0.22.0
make
Now double-check that you've built the right version with:
gaiad version
which should output
0.22.0-9f2b83cb
If it does, you're good to go!