Skip to content

Commit

Permalink
correctly brand packit config
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Sep 3, 2024
1 parent 3dd6ec4 commit 827d31a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: ansible-collection-theforeman-foreman.spec
specfile_path: ansible-collection-redhat-satellite.spec

# add or remove files that should be synced
files_to_sync:
- ansible-collection-theforeman-foreman.spec
- ansible-collection-redhat-satellite.spec
- .packit.yaml

# name in upstream package repository or registry (e.g. in PyPI)
upstream_package_name: theforeman.foreman
upstream_package_name: redhat.satellite
# downstream (Fedora) RPM package name
downstream_package_name: ansible-collection-theforeman-foreman
downstream_package_name: ansible-collection-redhat-satellite

upstream_tag_template: v{version}

actions:
post-upstream-clone:
- "wget https://github.com/theforeman/foreman-packaging/raw/rpm/develop/packages/plugins/ansible-collection-theforeman-foreman/ansible-collection-theforeman-foreman.spec -O ansible-collection-theforeman-foreman.spec"
- "wget https://github.com/theforeman/foreman-packaging/raw/rpm/develop/packages/satellite/ansible-collection-redhat-satellite/ansible-collection-redhat-satellite.spec -O ansible-collection-redhat-satellite.spec"
get-current-version:
- python3 -c 'import yaml; print(yaml.safe_load(open("galaxy.yml"))["version"].replace("-dev", ""))'
create-archive:
- make dist PYTHON_COMMAND=python3
- bash -c "ls -1t ./theforeman-foreman-*.tar.gz | head -n 1"
- bash -c "ls -1t ./redhat-satellite-*.tar.gz | head -n 1"

jobs:
- job: copr_build
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ $(RUNTIME_YML): FORCE
$(PYTHON_COMMAND) generate_action_groups.py

branding:
sed -i 's/theforeman\.foreman/redhat.satellite/g' plugins/*/*.py tests/inventory/*.foreman.yml tests/test_callback.py tests/test_module_state.py tests/test_playbooks/*.yml changelogs/config.yaml changelogs/changelog.yaml CHANGELOG.rst roles/*/README.md roles/*/*/*.yml docs/cvmanager.md tests/test_playbooks/fixtures/*.yml $(RUNTIME_YML) .ansible-lint
sed -i 's/theforeman\.foreman/redhat.satellite/g' plugins/*/*.py tests/inventory/*.foreman.yml tests/test_callback.py tests/test_module_state.py tests/test_playbooks/*.yml changelogs/config.yaml changelogs/changelog.yaml CHANGELOG.rst roles/*/README.md roles/*/*/*.yml docs/cvmanager.md tests/test_playbooks/fixtures/*.yml $(RUNTIME_YML) .ansible-lint .packit.yaml
sed -i 's/foreman.example.com/satellite.example.com/g' plugins/*/*.py docs/cvmanager.md roles/*/README.md roles/*/*/*.yml
sed -i 's#theforeman/foreman-ansible-modules#RedHatSatellite/satellite-ansible-collection#g' .github/workflows/*.yml
sed -i 's/theforeman-foreman/redhat-satellite/g' .github/workflows/*.yml
sed -i 's/theforeman-foreman/redhat-satellite/g' .github/workflows/*.yml .packit.yaml
sed -i 's/Foreman Ansible Modules/Red Hat Satellite Ansible Collection/g' docs/index.rst docs/conf.py docs/cvmanager.md docs/_gh_include/*.inc
sed -i 's/The Foreman Project/Red Hat, Inc./g' docs/conf.py
sed -i '/FOREMAN_\w/ s/FOREMAN_/SATELLITE_/g' plugins/doc_fragments/foreman.py plugins/module_utils/foreman_helper.py Makefile
Expand All @@ -158,6 +158,7 @@ branding:
sed -i 's/foreman:/satellite:/' $(RUNTIME_YML)
sed -i 's/foreman/satellite/' generate_action_groups.py .ansible-lint
sed -i '/group/ s/foreman/satellite/' tests/test_playbooks/module_defaults.yml
sed -i 's#packages/plugins#packages/satellite#' .packit.yaml
rm -rf tests/test_playbooks/scc_* tests/test_playbooks/tasks/scc_* tests/test_playbooks/fixtures/scc_* plugins/modules/scc_*.py tests/fixtures/apidoc/scc_*.json
rm -rf tests/test_playbooks/snapshot* tests/test_playbooks/tasks/snapshot* tests/test_playbooks/fixtures/snapshot* plugins/modules/snapshot*.py tests/fixtures/apidoc/snapshot*.json
rm -rf tests/test_playbooks/*_deb.yml
Expand Down

0 comments on commit 827d31a

Please sign in to comment.