Skip to content

Instantly share code, notes, and snippets.

View ygor-glaboo's full-sized avatar

Ygor ygor-glaboo

View GitHub Profile
@ygor-glaboo
ygor-glaboo / exportShortGitCommit.groovy
Created January 25, 2018 04:38 — forked from fabito/exportShortGitCommit.groovy
Exporting short git commit sha1 hash in Jenkins through System Groovy Script build step
import hudson.model.*
def env = build.getEnvironment()
def gitCommit = env['GIT_COMMIT']
def shortGitCommit = gitCommit[0..6]
def pa = new ParametersAction([
new StringParameterValue("SHORT_GIT_COMMIT", shortGitCommit)
])
WORKDIR=~/tmp/gdm-login-background
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
GSTRES=$(basename $GST)
mkdir -p $WORKDIR
cd $WORKDIR
mkdir theme
for r in `gresource list $GST`; do
gresource extract $GST $r >$WORKDIR$(echo $r | sed -e 's/^\/org\/gnome\/shell\//\//g')