Skip to content

Instantly share code, notes, and snippets.

@melezhik
Last active October 18, 2023 19:57
Show Gist options
  • Save melezhik/02b8fe1c0dbdfc98d12f27bbf94b2349 to your computer and use it in GitHub Desktop.
Save melezhik/02b8fe1c0dbdfc98d12f27bbf94b2349 to your computer and use it in GitHub Desktop.
Sparky scenario to for yarn and restart
#raku!
directory "scm";
say "current commit is: {tags()<SCM_SHA> || 'not set'}";
git-scm tags()<SCM_URL>, %(
to => "scm",
branch => tags<SCM_BRANCH>
);
bash "yarn install", %( cwd => "{$*CWD}/scm", description => "yarn install step" );
bash q:to /HERE/, %( cwd => "{$*CWD}/scm", description => "service terminate" );
pid=$(ps uax|grep service|awk '{print $2}')
kill $pid
HERE
bash "nohup ./service start &", %( cwd => "{$*CWD}/scm", description => "service start" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment