From 1c5fa0880d3bb21c7a3a5f53d0e7d3bab146baba Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 1 Jun 2024 04:11:01 +0800 Subject: [PATCH] refactor: restore shell script extensions Without an extension, the shell script configuration in `.gitattribute` will not work. --- .github/workflows/ci.yml | 2 +- _posts/2019-08-09-getting-started.md | 2 +- package.json | 4 ++-- tools/{init => init.sh} | 0 tools/{release => release.sh} | 2 +- tools/{run => run.sh} | 0 tools/{test => test.sh} | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename tools/{init => init.sh} (100%) rename tools/{release => release.sh} (98%) rename tools/{run => run.sh} (100%) rename tools/{test => test.sh} (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa8d0c9..ca60bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,4 +42,4 @@ jobs: run: npm i && npm run build - name: Test Site - run: bash tools/test + run: bash tools/test.sh diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index 1cea5be..3e0327a 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -35,7 +35,7 @@ Sign in to GitHub to [fork **Chirpy**](https://github.com/cotes2020/jekyll-theme Next, clone the repository to your local machine, make sure it has [Node.js][nodejs] installed, then go to the root directory of the repo and run the following command: ```console -$ bash tools/init +$ bash tools/init.sh ``` > If you don't want to deploy your site on GitHub Pages, append option `--no-gh` at the end of the above command. diff --git a/package.json b/package.json index 8600aa4..2c065bb 100644 --- a/package.json +++ b/package.json @@ -156,8 +156,8 @@ [ "@semantic-release/exec", { - "prepareCmd": "bash tools/release --prepare", - "publishCmd": "bash tools/release" + "prepareCmd": "bash tools/release.sh --prepare", + "publishCmd": "bash tools/release.sh" } ], [ diff --git a/tools/init b/tools/init.sh similarity index 100% rename from tools/init rename to tools/init.sh diff --git a/tools/release b/tools/release.sh similarity index 98% rename from tools/release rename to tools/release.sh index c2ea59e..6d010b6 100755 --- a/tools/release +++ b/tools/release.sh @@ -37,7 +37,7 @@ help() { echo " 2. Merge the release branch into the default branch" echo echo "Usage:" - echo " bash ./tools/release [options]" + echo " bash $0 [options]" echo echo "Options:" echo " --prepare Preparation for release" diff --git a/tools/run b/tools/run.sh similarity index 100% rename from tools/run rename to tools/run.sh diff --git a/tools/test b/tools/test.sh similarity index 97% rename from tools/test rename to tools/test.sh index fe47d44..331de1c 100755 --- a/tools/test +++ b/tools/test.sh @@ -19,7 +19,7 @@ help() { echo echo "Usage:" echo - echo " bash ./tools/test [options]" + echo " bash $0 [options]" echo echo "Options:" echo ' -c, --config "" Specify config file(s)'