fixed .deb package creation

pull/2/head
elinamorits 8 years ago
parent 86a214574d
commit 73a6e041fa

@ -1,3 +1,5 @@
SHELL:=/usr/bin/env bash
# #
# Building: # Building:
# #

@ -32,11 +32,11 @@ function reveal {
fi fi
if [[ ! -z "$passphrase" ]]; then if [[ ! -z "$passphrase" ]]; then
base="$base --batch --yes --passphrase $passphrase" echo "$passphrase" | $base --batch --yes --no-tty --passphrase-fd 0 -o "$line" "$encrypted_filename"
else
$base -o "$line" "$encrypted_filename"
fi fi
$base -o "$line" "$encrypted_filename"
counter=$((counter+1)) counter=$((counter+1))
done < "$SECRETS_DIR_PATHS_MAPPING" done < "$SECRETS_DIR_PATHS_MAPPING"

@ -23,3 +23,9 @@ function teardown {
run git secret notacommand run git secret notacommand
[ "$status" -eq 126 ] [ "$status" -eq 126 ]
} }
@test "run 'git secret --version'" {
run git secret --version
[ "$output" == "$GITSECRET_VERSION" ]
}

@ -3,7 +3,7 @@
set -e set -e
# Initializing and settings: # Initializing and settings:
READ_PEM=0744 READ_PEM=0644
EXEC_PEM=0755 EXEC_PEM=0755
SCRIPT_NAME="git-secret" SCRIPT_NAME="git-secret"
@ -23,22 +23,20 @@ rm -rf "$SCRIPT_BUILD_DIR"
mkdir -p "$SCRIPT_DEST_DIR" mkdir -p "$SCRIPT_DEST_DIR"
# Coping the files inside the build folder: # Coping the files inside the build folder:
install -b -m "$EXEC_PEM" "git-secret" "${SCRIPT_DEST_DIR}/git-secret" install -D -T -b -m "$EXEC_PEM" -T "git-secret" "${SCRIPT_DEST_DIR}/usr/bin/git-secret"
install -m "$READ_PEM" -d "${SCRIPT_DEST_DIR}/man/man1" install -m "$READ_PEM" -d "${SCRIPT_DEST_DIR}/usr/share/man/man1"
for file in man/man1/* ; do for file in man/man1/* ; do
if [[ "$file" == *.ronn ]]; then if [[ "$file" == *.ronn ]]; then
continue continue
fi fi
install -b -m "$READ_PEM" "$file" "${SCRIPT_DEST_DIR}/${file}" install -D -T -b -m "$READ_PEM" -T "$file" "${SCRIPT_DEST_DIR}/usr/share/${file}"
done done
# Building .deb package: # Building .deb package:
cd "$SCRIPT_DEST_DIR" && fpm -s dir -t deb \ cd "$SCRIPT_DEST_DIR" && fpm -s dir -t deb \
-a all \ -a all \
-n "$SCRIPT_NAME" \ -n "$SCRIPT_NAME" \
-d git \
-d gpg \
--epoch "$SCRIPT_EPOCH" \ --epoch "$SCRIPT_EPOCH" \
--version "$SCRIPT_VERSION" \ --version "$SCRIPT_VERSION" \
--iteration "$SCRIPT_ITERATION" \ --iteration "$SCRIPT_ITERATION" \

Loading…
Cancel
Save