Skip to content

Instantly share code, notes, and snippets.

View maxrimue's full-sized avatar

Max Rittmüller maxrimue

View GitHub Profile
@maxrimue
maxrimue / readme.md
Last active March 13, 2021 12:21
Use yarn with Greenkeeper

Use yarn with Greenkeeper

When using yarn, it will create a yarn.lock lockfile which holds data on your used dependencies. This file also includes hard-typed versions, so should you update your dependencies, the yarn.lock file is basically outdated and needs to be regenerated. While yarn does this automatically, Greenkeeper pull requests that update dependencies as of right now do not do this regeneration, which means you would have to do it manually.

This gist shows you a way how to automatise this step using a Travis CI script.

Prerequisites

  • You use Travis CI and have it build Pull Requests (default behaviour)
  • You have a yarn.lock file in your repository for Travis CI to automatically install yarn (yarn will be added to their default images soon)

Getting started

Keybase proof

I hereby claim:

  • I am maxrimue on github.
  • I am maxrimue (https://keybase.io/maxrimue) on keybase.
  • I have a public key whose fingerprint is B9CE 163C 530D 4B14 35B7 F5E9 D71C 1093 734A 26AF

To claim this, I am signing this object:

@maxrimue
maxrimue / semver.sh
Created July 24, 2015 15:36
Compare semantic versions in pure bash
#!/bin/bash
# Assume we have two semantic versions that we want to compare:
version1=0.12.0
version2=1.15.5
# First, we replace the dots by blank spaces, like this:
version1=${version1//./ }