From 317907545b417024f896355c49fbeebe328486ed Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 23 Apr 2026 00:15:19 +0200 Subject: [PATCH] tidy-up: rename `ci` directory to `scripts` To reduce differences with curl. Also: - add most scripts to the source distro tarball. Some were referenced by build scripts (e.g. `checksrc`). Closes #1870 --- .github/workflows/ci.yml | 10 +++++----- CMakeLists.txt | 4 ++-- Makefile.am | 13 +++++++++++-- appveyor.yml | 2 +- {ci => scripts}/appveyor/docker-bridge.ps1 | 0 {ci => scripts}/appveyor/docker-bridge.sh | 0 {ci => scripts}/checksrc-all.pl | 0 {ci => scripts}/checksrc.pl | 0 {ci => scripts}/cmakelint.sh | 0 {ci => scripts}/codespell-ignore.words | 0 {ci => scripts}/shellcheck.sh | 0 {ci => scripts}/spacecheck.pl | 0 {ci => scripts}/spellcheck.sh | 2 +- 13 files changed, 20 insertions(+), 11 deletions(-) rename {ci => scripts}/appveyor/docker-bridge.ps1 (100%) rename {ci => scripts}/appveyor/docker-bridge.sh (100%) rename {ci => scripts}/checksrc-all.pl (100%) rename {ci => scripts}/checksrc.pl (100%) rename {ci => scripts}/cmakelint.sh (100%) rename {ci => scripts}/codespell-ignore.words (100%) rename {ci => scripts}/shellcheck.sh (100%) rename {ci => scripts}/spacecheck.pl (100%) rename {ci => scripts}/spellcheck.sh (80%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58407210..2e36e2dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: with: persist-credentials: false - name: 'checksrc' - run: ci/checksrc-all.pl + run: scripts/checksrc-all.pl linters: name: 'linters' @@ -85,20 +85,20 @@ jobs: run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" shellcheck --version - ci/shellcheck.sh + scripts/shellcheck.sh - name: 'spacecheck' - run: ci/spacecheck.pl + run: scripts/spacecheck.pl - name: 'cmakelint' run: | source ~/venv/bin/activate - ci/cmakelint.sh + scripts/cmakelint.sh - name: 'spellcheck' run: | source ~/venv/bin/activate - ci/spellcheck.sh + scripts/spellcheck.sh build_integration: name: 'CM integration ${{ matrix.image }}' diff --git a/CMakeLists.txt b/CMakeLists.txt index e63d06fb..5aa20c5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -550,8 +550,8 @@ endif() if(LINT) add_custom_target(lint ALL WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - COMMAND "${PERL_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/ci/checksrc-all.pl" - DEPENDS "${PROJECT_SOURCE_DIR}/ci/checksrc-all.pl" "${PROJECT_SOURCE_DIR}/ci/checksrc.pl" + COMMAND "${PERL_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/checksrc-all.pl" + DEPENDS "${PROJECT_SOURCE_DIR}/scripts/checksrc-all.pl" "${PROJECT_SOURCE_DIR}/scripts/checksrc.pl" ) if(BUILD_STATIC_LIBS) add_dependencies(${LIB_STATIC} lint) diff --git a/Makefile.am b/Makefile.am index cd6f8e7a..0a7029c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,9 +37,18 @@ OS400FILES = os400/README400 os400/initscript.sh os400/make.sh \ os400/libssh2rpg/libssh2_sftp.rpgle \ os400/rpg-examples/SFTPXMPLE +SCRIPTSFILES = \ + scripts/checksrc-all.pl \ + scripts/checksrc.pl \ + scripts/cmakelint.sh \ + scripts/spacecheck.pl \ + scripts/spellcheck.sh \ + scripts/codespell-ignore.words + EXTRA_DIST = $(WIN32FILES) get_ver.awk \ maketgz RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath \ - CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) + CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) \ + $(SCRIPTSFILES) ACLOCAL_AMFLAGS = -I m4 @@ -81,4 +90,4 @@ gen-coverage: coverage: init-coverage build-coverage gen-coverage checksrc: - ci/checksrc-all.pl + scripts/checksrc-all.pl diff --git a/appveyor.yml b/appveyor.yml index 449e0850..32a012df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -106,7 +106,7 @@ install: - ps: | $env:OPENSSH_SERVER_PORT = Get-Random -Minimum 2000 -Maximum 2300 [System.Environment]::SetEnvironmentVariable('OPENSSH_SERVER_PORT', $env:OPENSSH_SERVER_PORT) - .\ci\appveyor\docker-bridge.ps1 + ./scripts/appveyor/docker-bridge.ps1 build_script: - cmd: sh -c ./appveyor.sh diff --git a/ci/appveyor/docker-bridge.ps1 b/scripts/appveyor/docker-bridge.ps1 similarity index 100% rename from ci/appveyor/docker-bridge.ps1 rename to scripts/appveyor/docker-bridge.ps1 diff --git a/ci/appveyor/docker-bridge.sh b/scripts/appveyor/docker-bridge.sh similarity index 100% rename from ci/appveyor/docker-bridge.sh rename to scripts/appveyor/docker-bridge.sh diff --git a/ci/checksrc-all.pl b/scripts/checksrc-all.pl similarity index 100% rename from ci/checksrc-all.pl rename to scripts/checksrc-all.pl diff --git a/ci/checksrc.pl b/scripts/checksrc.pl similarity index 100% rename from ci/checksrc.pl rename to scripts/checksrc.pl diff --git a/ci/cmakelint.sh b/scripts/cmakelint.sh similarity index 100% rename from ci/cmakelint.sh rename to scripts/cmakelint.sh diff --git a/ci/codespell-ignore.words b/scripts/codespell-ignore.words similarity index 100% rename from ci/codespell-ignore.words rename to scripts/codespell-ignore.words diff --git a/ci/shellcheck.sh b/scripts/shellcheck.sh similarity index 100% rename from ci/shellcheck.sh rename to scripts/shellcheck.sh diff --git a/ci/spacecheck.pl b/scripts/spacecheck.pl similarity index 100% rename from ci/spacecheck.pl rename to scripts/spacecheck.pl diff --git a/ci/spellcheck.sh b/scripts/spellcheck.sh similarity index 80% rename from ci/spellcheck.sh rename to scripts/spellcheck.sh index c2476f90..8ec52ef0 100755 --- a/ci/spellcheck.sh +++ b/scripts/spellcheck.sh @@ -9,5 +9,5 @@ cd "$(dirname "$0")"/.. git ls-files -z | xargs -0 -r \ codespell \ --skip 'docs/AUTHORS' \ - --ignore-words 'ci/codespell-ignore.words' \ + --ignore-words 'scripts/codespell-ignore.words' \ --