Skip to content

Commit 641bdcf

Browse files
committed
chore(deps): update dependency developerc286/clean_git_history to v1
1 parent a2f2d05 commit 641bdcf

File tree

3 files changed

+12
-62
lines changed

3 files changed

+12
-62
lines changed

.github/workflows/git-history.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
ref: ${{ github.event.pull_request.head.sha }}
2222
fetch-depth: 0
2323
- name: Check clean Git history.
24-
run: earthly --ci +check-clean-git-history --from_reference "origin/${{ github.base_ref }}"
24+
run: earthly --ci +check-clean-git-history --from "origin/${{ github.base_ref }}"

Earthfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ alpine-base:
2323
check-clean-git-history:
2424
FROM +alpine-base
2525
# renovate: datasource=github-releases depName=DeveloperC286/clean_git_history
26-
ENV CLEAN_GIT_HISTORY_VERSION="v0.2.0"
27-
RUN wget -O - "https://github.com/DeveloperC286/clean_git_history/releases/download/${CLEAN_GIT_HISTORY_VERSION}/x86_64-unknown-linux-musl.gz" | gzip -d > /usr/bin/clean_git_history && chmod 755 /usr/bin/clean_git_history
26+
ENV CLEAN_GIT_HISTORY_VERSION="v1.0.0"
27+
RUN wget -O - "https://github.com/DeveloperC286/clean_git_history/releases/download/${CLEAN_GIT_HISTORY_VERSION}/x86_64-unknown-linux-musl.tar.gz" | tar xz --directory "/usr/bin/"
2828
DO +COPY_METADATA
29-
ARG from_reference="origin/HEAD"
30-
RUN ./ci/check-clean-git-history.sh --from-reference "${from_reference}"
29+
ARG from="origin/HEAD"
30+
RUN ./ci/check-clean-git-history.sh "${from_reference}"
3131

3232

3333
check-conventional-commits-linting:

ci/check-clean-git-history.sh

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,11 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

3-
# ARG_OPTIONAL_SINGLE([from-reference],[],[],[origin/HEAD])
4-
# ARGBASH_GO()
5-
# needed because of Argbash --> m4_ignore([
6-
### START OF CODE GENERATED BY Argbash v2.9.0 one line above ###
7-
# Argbash is a bash code generator used to get arguments parsing right.
8-
# Argbash is FREE SOFTWARE, see https://argbash.io for more info
9-
# Generated online by https://argbash.io/generate
10-
11-
die() {
12-
local _ret="${2:-1}"
13-
test "${_PRINT_HELP:-no}" = yes && print_help >&2
14-
echo "$1" >&2
15-
exit "${_ret}"
16-
}
17-
18-
begins_with_short_option() {
19-
local first_option all_short_options=''
20-
first_option="${1:0:1}"
21-
test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0
22-
}
23-
24-
# THE DEFAULTS INITIALIZATION - OPTIONALS
25-
_arg_from_reference="origin/HEAD"
26-
27-
print_help() {
28-
printf 'Usage: %s [--from-reference <arg>]\n' "$0"
29-
}
30-
31-
parse_commandline() {
32-
while test $# -gt 0; do
33-
_key="$1"
34-
case "$_key" in
35-
--from-reference)
36-
test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1
37-
_arg_from_reference="$2"
38-
shift
39-
;;
40-
--from-reference=*)
41-
_arg_from_reference="${_key##--from-reference=}"
42-
;;
43-
*)
44-
_PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1
45-
;;
46-
esac
47-
shift
48-
done
49-
}
50-
51-
parse_commandline "$@"
52-
53-
# OTHER STUFF GENERATED BY Argbash
54-
55-
### END OF CODE GENERATED BY Argbash (sortof) ### ])
56-
# [ <-- needed because of Argbash
573
set -o errexit
584
set -o xtrace
595

60-
clean_git_history --from-reference "${_arg_from_reference}"
61-
# ] <-- needed because of Argbash
6+
if [ $# -ne 1 ]; then
7+
echo "Usage: $0 <from>"
8+
exit 1
9+
fi
10+
11+
clean_git_history "$1"

0 commit comments

Comments
 (0)