Skip to content

Commit e7d968f

Browse files
committed
Smarter updating of project URL
1 parent eda3299 commit e7d968f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/template-janitor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
run: |
2424
echo "NEW_ORG=${{ github.repository_owner }}" >> $GITHUB_ENV
2525
echo "NEW_PROJECT=${{ github.event.repository.name }}" >> $GITHUB_ENV
26+
echo "NEW_URL=${{ github.repositoryUrl}}" >> $GITHUB_ENV
2627
2728
- uses: octokit/[email protected]
2829
id: get_repo_meta
@@ -38,6 +39,7 @@ jobs:
3839
run: |
3940
# rename the CMake project to match the github project
4041
sed -i "s/myproject/${{ github.event.repository.name }}/gi" CMakeLists.txt configured_files/config.hpp.in
42+
sed -i "s/%%myurl%%/${{ github.event.repositoryUrl }}/gi" CMakeLists.txt configured_files/config.hpp.in
4143
4244
# fill in placeholders of readme and move it into place
4345
sed -i "s/%%myorg%%/${{ env.NEW_ORG }}/g" ${{ env.TEMPLATES_PATH }}/README.md

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ project(
3737
myproject
3838
VERSION 0.0.1
3939
DESCRIPTION ""
40-
HOMEPAGE_URL "https://github.com/%%myorg%%/%%myproject%%"
40+
HOMEPAGE_URL "%%url%%"
4141
LANGUAGES CXX C)
4242

4343
set(GIT_SHA

0 commit comments

Comments
 (0)