Files
52bb73b6fd shellcheck (#23)
* shellcheck

* fix(script): shellcheck and refactor

* fix(scripts): rename snake_casing no .sh

Follows Google's Shell Style Guide:
https://google.github.io/styleguide/shellguide.html

Script names must use snake_casing

Remove the `.sh` extension on `chmod +x` scripts because
the shell interpreter choice is in the shebang.

The `.sh` extension is to be maintained for sourced scripts because
those are not stand-alone executables:

```sh
. sourced_script.sh # . sourcing
source sourced_script.sh # alternate syntax
```

* decomp

* Stay CI

Co-authored-by: Léa Gris <lea.gris@noiraude.net>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
2022-02-20 18:02:33 +01:00

13 lines
438 B
Bash
Executable File

#!/usr/bin/env bash
if ! git diff --name-only HEAD HEAD~1 | grep -qF 'build.gradle'; then
new_version="$(date +%s)"
sed --in-place "s!^//version:.*!//version: $new_version!g" build.gradle
git add build.gradle
git commit -m "[ci skip] update build script version to $new_version"
git push
printf 'Updated buildscript version to %s\n' "$new_version"
else
printf 'Ignored buildscript version update: no changes detected\n'
fi