Extraction automatique du nom de projet avant le packaging
This commit is contained in:
parent
448a16f659
commit
1d566f8de8
13
hooks/prebuild/debian/complete-project-db
Executable file
13
hooks/prebuild/debian/complete-project-db
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd src
|
||||
|
||||
if [ -z "$(tamarin_db get project_name)" ]; then
|
||||
if [ ! -d ".git" ]; then
|
||||
tamarin_error "This project is not managed with Git ! Cannot extract the project's name without it !"
|
||||
exit 1
|
||||
fi
|
||||
project_name=$(basename $(git config --get remote.origin.url) | sed 's/.git$//' | tr '[:upper:]' '[:lower:]')
|
||||
tamarin_info "Extracted project name from Git metadata: \"${project_name}\""
|
||||
tamarin_db set project_name "${project_name}"
|
||||
fi
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
source "${DIR}/util.sh"
|
||||
|
||||
info "Updating packages definition..."
|
||||
apt-get update 2> >(stderr) 1> >(stdout)
|
||||
|
||||
info "Installing package $1..."
|
||||
gdebi --n "$1" 2> >(stderr) 1> >(stdout)
|
@ -12,6 +12,7 @@ hooks=containerbuild/debian/install-build-essential,
|
||||
[prebuild]
|
||||
hooks=prebuild/debian/load-project-db,
|
||||
prebuild/debian/copy-sources-to-workspace,
|
||||
prebuild/debian/complete-project-db,
|
||||
prebuild/debian/create-changelog,
|
||||
prebuild/debian/create-dummy-changelog,
|
||||
prebuild/debian/add-package-version-suffix,
|
||||
|
Loading…
Reference in New Issue
Block a user