mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 06:13:21 +00:00
Merge pull request #441 from t-woerner/galaxy_namespace_arg
Support namespace and name in utils/build-galaxy-release.sh as args
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
namespace="freeipa"
|
namespace="${1:freeipa}"
|
||||||
collection="ansible_freeipa"
|
collection="${2:ansible_freeipa}"
|
||||||
collection_prefix="${namespace}.${collection}"
|
collection_prefix="${namespace}.${collection}"
|
||||||
|
|
||||||
galaxy_version=$(git describe --tags | sed -e "s/^v//")
|
galaxy_version=$(git describe --tags | sed -e "s/^v//")
|
||||||
echo $galaxy_version | grep "-" -q || galaxy_version="${galaxy_version}"
|
echo $galaxy_version | grep "-" -q || galaxy_version="${galaxy_version}"
|
||||||
sed -i -e "s/version: .*/version: \"$galaxy_version\"/" galaxy.yml
|
sed -i -e "s/version: .*/version: \"$galaxy_version\"/" galaxy.yml
|
||||||
|
sed -i -e "s/namespace: .*/namespace: \"$namespace\"/" galaxy.yml
|
||||||
|
sed -i -e "s/name: .*/name: \"$collection\"/" galaxy.yml
|
||||||
|
|
||||||
find . -name "*~" -exec rm {} \;
|
find . -name "*~" -exec rm {} \;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user