Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release_collection.py - Add --skip-git option; Skip ansible-galaxy if it does not exist. #103

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

nhosoi
Copy link
Contributor

@nhosoi nhosoi commented Oct 14, 2021

Planning to use release_collection.py in the spec file with the --skip-git option.

@richm
Copy link
Contributor

richm commented Oct 14, 2021

ok - so how will this work from inside the spec file? Will the spec file create a file like collection_release.yml based on each rolename and %deftag or %defcommit? I guess that is only needed for the list of roles to include - which can also be provided by the --include argument.

@nhosoi
Copy link
Contributor Author

nhosoi commented Oct 14, 2021

ok - so how will this work from inside the spec file? Will the spec file create a file like collection_release.yml based on each rolename and %deftag or %defcommit? I guess that is only needed for the list of roles to include - which can also be provided by the --include argument.

This is my testing branch.
https://src.fedoraproject.org/fork/nhosoi/rpms/linux-system-roles/blob/release_collection/f/linux-system-roles.spec

I'm running release_collection.py with the list of included roles like this.

declare -A includes
for role in %{rolenames}; do
    includes="$includes --include $role"
done

python3 release_collection.py --galaxy-yml galaxy.yml --src-path $(pwd) \
    --dest-path $(pwd)/.collections $includes --force --skip-git --no-update

We can simplify the spec file a lot with this replacement.

Copy link
Contributor

@richm richm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nhosoi
Copy link
Contributor Author

nhosoi commented Oct 14, 2021

Thanks, @richm!

@nhosoi nhosoi merged commit aed8f06 into linux-system-roles:master Oct 14, 2021
@nhosoi nhosoi deleted the skip-git branch October 14, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants