Commit Graph

24 Commits

Author SHA1 Message Date
Jia Yuan Lo bd731cc864 scripts(lint-packages): add end of line check
Also fix a bug where TERMUX_PKG_SRCURL error message is truncated
2024-05-02 13:58:51 +08:00
TomIO 86fbe4846a scripts(lint-packages): housekeeping and cleanup
[no ci]
- standardize on bash test `[[ ]]`
- use arithmetic evaluation for numeric tests `(( ))`
- turn `if/else`'s into guard clauses where applicable
- use `case` for `true|false` variables
2024-04-23 20:25:35 +02:00
TomIO 2970a00200 scripts(lint-packages): add indentation checks
Also slightly improved the trailing whitespace check's output
and did a bit of general cleanup.
2024-04-23 20:25:35 +02:00
Jia Yuan Lo dd51b4f918 scripts(lint-packages): add file permission, trailing whitespace checks 2024-04-22 10:05:01 +08:00
notfound405 931251b3f4 linter: add curl license id (https://spdx.org/licenses/curl) 2023-12-03 23:09:07 +08:00
Leonid Pliushch 5a1a95d93f
scripts(lint-packages.sh): replace REPO_DIR with TERMUX_SCRIPTDIR
TERMUX_SCRIPTDIR is a common global variable used across various parts
of build system and helper scripts. Scripts which source parts of the
latter must define this variable to have things working correctly.
2023-10-15 21:58:27 +03:00
Jia Yuan Lo fec4502c52 scripts(lint-packages.sh): allow tilde ~ character
Needed to indicate version prerelease, release candidate, beta etc.
2023-10-07 07:35:47 +08:00
Lucy Phipps 5ed8471923
revert this mess 2023-09-03 08:46:13 +01:00
Lucy Phipps 69028bfb72
actually fix all uses of properties.sh 2023-09-03 08:37:10 +01:00
Ivan Max a46e3e9357
build-package.sh: adding compilation based on glibc (#16901)
[skip ci]
2023-08-30 23:40:08 +03:00
Tee KOBAYASHI 695de19a05 lint-packages: Check package / subpackage name
Source: https://www.debian.org/doc/debian-policy/ch-controlfields.html#source
2023-01-15 13:28:30 +00:00
Henrik Grimler 20bd0f0dc0
scripts: use git+[...] instead of [...].git for git urls
Not all source code hosters support the .git suffix (for example
sourcehut).  Use a git+ prefix instead to indicate that a url is a git
repo.
2023-01-01 18:31:38 +01:00
2096779623 7c4c6692f0
linter: add X11 license (https://spdx.org/licenses/X11.html)
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-08-23 08:44:51 +02:00
Henrik Grimler 56dbb9cf80
CI: specify distribution in repo.json as well
x11-repo uses distribution x11, and root-repo distribution root.
Store this information in the json file as well, and parse it to set
both REPOSITORY_NAME and REPOSITORY_DISTRIBUTION.

Also remove unnecessary `< repo.json` from jq command, jq accepts the
file as an argument.

This fixes upload issues to x11-repo and root-repo.
2022-04-20 16:37:36 +02:00
Yaksh Bariya 66af228cfe
scripts/lint-packages.sh: adapt to new repository structure 2022-04-19 07:19:39 +05:30
Leonid Pliushch b048650736
linter: fix detecting invalid versions 2021-12-26 17:47:07 +02:00
Leonid Pliushch 1b7a64470c
linter: check package version format 2021-12-23 15:31:33 +02:00
Leonid Pliushch 6bc5ce5bf5 linter: add PHP-3.01 license id (https://spdx.org/licenses/) 2021-05-05 11:00:48 +02:00
Leonid Pliushch 8ac3d03bf7
linter: check build.sh for presence of 'TERMUX_PKG_MAINTAINER' field 2021-01-22 13:41:52 +02:00
Henrik Grimler ca34d7345d lint-packages: allow TERMUX_PKG_SHA256 to be empty sometimes
If TERMUX_PKG_SRCURL is git repo (url ends with .git) then no hashsum
needs to be given.
2020-07-21 10:14:19 +02:00
Henrik Grimler ab2a3b70f0 build-package.sh: add TERMUX_PKG_SERVICE_SCRIPT var and build script
termux_step_install_service_scripts is run after
termux_step_post_make_install and loops over the new array
TERMUX_PKG_SERVICE_SCRIPT to add service scripts for termux-services.

The service scripts are usually only a one-liner so we might just as
well define it in a variable like TERMUX_PKG_SERVICE_SCRIPT.

TERMUX_PKG_SERVICE_SCRIPT should be an array on the format
("daemon-name" 'script to execute' "another daemon" 'multi\n line\n script'),
i.e. it should be of even length with name + script where the script
part preferably is within single quotes (to avoid accidental expansion
of for example $HOME).
2020-01-05 15:00:15 +01:00
Leonid Pliushch ce0a30d684 linter: source ./scripts/properties.sh only if it exists 2019-08-14 15:13:39 +03:00
Leonid Pliushch a4b1f952c1 linter: specify that non-https links are still acceptable
%ci:no-build
2019-08-14 14:59:47 +03:00
Leonid Pliushch 8701462951 add new linter script & fix packages where needed
Linter will check packages submitted for CI build. If error was found,
build will not be allowed.

To ensure that all build.sh scripts are consistent and have at least
minimal allowed quality, linter is permanently enabled for all branches
and pull requests.
2019-08-14 14:27:55 +03:00