Skip to content

Commit

Permalink
ci: fix create package ci (#47)
Browse files Browse the repository at this point in the history
* add create-ros2-package workflow and template files

Signed-off-by: Autumn60 <[email protected]>

* rename template files

Signed-off-by: Autumn60 <[email protected]>

* fix create_pkg ci

Signed-off-by: Autumn60 <[email protected]>

---------

Signed-off-by: Autumn60 <[email protected]>
Co-authored-by: Autumn60 <[email protected]>
  • Loading branch information
Autumn60 and Autumn60 authored Jun 20, 2024
1 parent e781da0 commit b3432fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/create-ros2-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
exit 1
fi
mkdir ${{ inputs.package-name}} && cd ${{ inputs.package-name}}
mkdir ${{ inputs.package-name }} && cd ${{ inputs.package-name }}
if [[ "${{ inputs.package-name }}" != *_msgs ]]; then
mkdir src && touch src/.gitkeep
mkdir include/${{ inputs.package-name}} && touch include/${{ inputs.package-name}}/.gitkeep
mkdir include/${{ inputs.package-name }} && touch include/${{ inputs.package-name }}/.gitkeep
mkdir launch && touch launch/.gitkeep
cp ../.template-package/.CMakeLists.txt ./CMakeLists.txt
cp ../.template-package/.package.xml ./package.xml
Expand All @@ -51,9 +51,9 @@ jobs:
cp ../.template-interface-package/.package.xml ./package.xml
fi
sed 's/__PACKAGE_NAME__/package-name/g' ./CMakeLists.txt > "./CMakeLists.txt.tmp"
sed 's/__PACKAGE_NAME__/${{ inputs.package-name }}/g' ./CMakeLists.txt > "./CMakeLists.txt.tmp"
mv "./CMakeLists.txt.tmp" "./CMakeLists.txt"
sed -e 's/__PACKAGE_NAME__/package-name/g' -e 's/__MAINTAINER_EMAIL__/maintainer-email/g' -e 's/__MAINTAINER_NAME__/maintainer-name/g' ./package.xml > "./package.xml.tmp"
sed -e 's/__PACKAGE_NAME__/${{ inputs.package-name }}/g' -e 's/__MAINTAINER_EMAIL__/${{ inputs.maintainer-email }}/g' -e 's/__MAINTAINER_NAME__/${{ inputs.maintainer-name }}/g' ./package.xml > "./package.xml.tmp"
mv "./package.xml.tmp" "./package.xml"
- name: Create PR
Expand Down

0 comments on commit b3432fa

Please sign in to comment.