Skip to content

Commit c735d95

Browse files
committed
Update
1 parent a9c39ca commit c735d95

10 files changed

+6525
-2874
lines changed

.github/workflows/test-core.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Test Core
22

33
on:
44
workflow_call:
5-
inputs:
6-
main-repo:
7-
required: true
8-
type: boolean
9-
fix-404:
10-
required: true
11-
type: boolean
5+
#inputs:
6+
#main-repo:
7+
#required: true
8+
#type: boolean
9+
#fix-404:
10+
#required: true
11+
#type: boolean
1212

1313
jobs:
1414
test:
@@ -24,7 +24,8 @@ jobs:
2424
uses: ./
2525
with:
2626
project-path: Test/Test.csproj
27-
main-repo: ${{ inputs.main-repo }}
28-
fix-404: ${{ inputs.fix-404 }}
27+
#main-repo: ${{ inputs.main-repo }}
28+
#fix-404: ${{ inputs.fix-404 }}
2929
- name: Verify
30-
run: Test/Verify.sh --main-repo=${{ inputs.main-repo }} --fix-404=${{ inputs.fix-404 }} ${{ github.event.repository.name }}
30+
#run: Test/Verify.sh --main-repo=${{ inputs.main-repo }} --fix-404=${{ inputs.fix-404 }} ${{ github.event.repository.name }}
31+
run: Test/Verify.sh ${{ github.event.repository.name }}

.github/workflows/test.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,29 @@ on:
77
branches: ["main"]
88

99
jobs:
10-
test-non-main-repo-fix-404:
11-
uses: ./.github/workflows/test-core.yml
12-
with:
13-
main-repo: false
14-
fix-404: true
10+
#test-non-main-repo-fix-404:
11+
#uses: ./.github/workflows/test-core.yml
12+
#with:
13+
#main-repo: false
14+
#fix-404: true
1515

16-
test-main-repo-fix-404:
17-
uses: ./.github/workflows/test-core.yml
18-
with:
19-
main-repo: true
20-
fix-404: true
16+
#test-main-repo-fix-404:
17+
#uses: ./.github/workflows/test-core.yml
18+
#with:
19+
#main-repo: true
20+
#fix-404: true
2121

22-
test-non-main-repo-no-fix-404:
23-
uses: ./.github/workflows/test-core.yml
24-
with:
25-
main-repo: false
26-
fix-404: false
22+
#test-non-main-repo-no-fix-404:
23+
#uses: ./.github/workflows/test-core.yml
24+
#with:
25+
#main-repo: false
26+
#fix-404: false
27+
28+
#test-main-repo-no-fix-404:
29+
#uses: ./.github/workflows/test-core.yml
30+
#with:
31+
#main-repo: true
32+
#fix-404: false
2733

28-
test-main-repo-no-fix-404:
34+
test:
2935
uses: ./.github/workflows/test-core.yml
30-
with:
31-
main-repo: true
32-
fix-404: false

Test/Verify.sh

+33-30
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
#!/usr/bin/bash
22

3-
if [ $1 == "--main-repo=false" ]; then
4-
MAINREPO=false;
5-
elif [ $1 == "--main-repo=true" ]; then
6-
MAINREPO=true;
7-
else
8-
echo Unknown Argument.
9-
exit 1
10-
fi
3+
#if [ $1 == "--main-repo=false" ]; then
4+
# MAINREPO=false;
5+
#elif [ $1 == "--main-repo=true" ]; then
6+
# MAINREPO=true;
7+
#else
8+
# echo Unknown Argument.
9+
# exit 1
10+
#fi
1111

12-
if [ $2 == "--fix-404=false" ]; then
13-
FIX404=false;
14-
elif [ $2 == "--fix-404=true" ]; then
15-
FIX404=true;
16-
else
17-
echo Unknown Argument.
18-
exit 1
19-
fi
12+
#if [ $2 == "--fix-404=false" ]; then
13+
# FIX404=false;
14+
#elif [ $2 == "--fix-404=true" ]; then
15+
# FIX404=true;
16+
#else
17+
# echo Unknown Argument.
18+
# exit 1
19+
#fi
2020

21-
if [ ! -f _out/wwwroot/.nojekyll ]; then
22-
echo ".nojekyll doesn't exist!"
23-
exit 1
24-
fi
21+
#if [ ! -f _out/wwwroot/.nojekyll ]; then
22+
# echo ".nojekyll doesn't exist!"
23+
# exit 1
24+
#fi
2525

26-
if [ $MAINREPO == true ]; then
27-
grep -i 'base href="/"' _out/wwwroot/index.html > /dev/null
28-
else
29-
grep -i "base href=\"/$3/\"" _out/wwwroot/index.html > /dev/null
30-
fi
26+
#if [ $MAINREPO == true ]; then
27+
# grep -i 'base href="/"' _out/wwwroot/index.html > /dev/null
28+
#else
29+
# grep -i "base href=\"/$3/\"" _out/wwwroot/index.html > /dev/null
30+
#fi
3131

32-
if [ $MAINREPO == false ] && [ $FIX404 == true ]; then
33-
grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
34-
else
35-
! grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
36-
fi
32+
#if [ $MAINREPO == false ] && [ $FIX404 == true ]; then
33+
# grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
34+
#else
35+
# ! grep -i "/$3/?p=/" _out/wwwroot/404.html > /dev/null
36+
#fi
37+
38+
grep -i "base href=\"/$1/\"" _out/wwwroot/index.html > /dev/null
39+
! grep -i "/$1/?p=/" _out/wwwroot/404.html > /dev/null

0 commit comments

Comments
 (0)