Extraction automatique du nom de projet avant le packaging
This commit is contained in:
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
|
Reference in New Issue
Block a user