mirror of
https://github.com/sobolevn/git-secret
synced 2024-10-31 21:20:29 +00:00
19941f91f4
* Adds release-ci script to test installation * Fixes CI * Fixes CI * Renames some variables to follow the same SECRETS_ convention
31 lines
851 B
Bash
Executable File
31 lines
851 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [ -z "$SECRETS_ARTIFACTORY_CREDENTIALS" ]; then
|
|
echo '$SECRETS_ARTIFACTORY_CREDENTIALS is not set'
|
|
exit 1
|
|
fi
|
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
source "$SECRETS_PROJECT_ROOT/utils/build-utils.sh"
|
|
|
|
# Artifactory location:
|
|
BASE_API_URL='https://gitsecret.jfrog.io/artifactory'
|
|
|
|
# This folder should contain just one `.dev` file:
|
|
DEB_FILE_LOCATION="$(locate_release 'deb')"
|
|
DEB_FILE_NAME="$(basename "$DEB_FILE_LOCATION")"
|
|
|
|
|
|
curl -sS -u "$SECRETS_ARTIFACTORY_CREDENTIALS" \
|
|
-XPUT "$BASE_API_URL/git-secret-deb/$DEB_FILE_NAME;deb.distribution=git-secret;deb.component=main;deb.architecture=all" \
|
|
-T "$DEB_FILE_LOCATION"
|
|
|
|
# Now, we need to trigger metadata reindex:
|
|
curl -sS -u "$SECRETS_ARTIFACTORY_CREDENTIALS" \
|
|
-XPOST "$BASE_API_URL/api/deb/reindex/git-secret-deb"
|
|
|
|
echo
|
|
echo "Done: released $DEB_FILE_NAME"
|