Skip to content

Add license check target and some bash utils

Choose a tag to compare

@name212 name212 released this 11 Aug 19:22
· 5 commits to main since this release
2ebfe76

BREAKING CHANGES:

  • BINARIES_PATH move from $(CURDIR)/bin to $(CURDIR)/.bin
    Please update your .gitignore file from ignore bin/ dir to .bin/!
  • common/git/check/has-diff - now output new files not in index-tree, if FILES_TO_CHECK and FILES_TO_SKIP

Add:

  • Makefile variables:
    • GET_GIT_FILES_SEPARATOR - files list separator using to output in bash function get_git_changed_files
  • Next bash utils functions in includes defines:
    • INCLUDE_STRINGS - some string urils
      • append_str_with_separator - append string to end with separator
        prefix and return
      • append_str_with_new_line - call append_str_with_separator with new
        line separator
      • shift_str_on - split string by new line and add prefix (shift) for
        each line
        • shift_str_on_tab - call shift_str_on with tab prefix
        • escape_re_str - escape string as regexp string (to pass to grep)
    • INCLUDE_FS_CONSUME - call function with glob find
      • toggle_globs - enable/disable next globs params dotglob nullglob
        globstar
        • is_glob - check passed string is glob string
      • do_in_dir - cd to dir and do function, after call returns to
        current dir.
        • foreach_dir_by_glob - call function for each file found by glob
    • INCLUDE_GIT_OPS - some git operations
      • is_git_repo_has_not_changes - returns 1 if git repo has diff
        (uncommit changes)
      • get_git_changed_files - returns 1 and echo list of files have
        changes in one string separated by $(GET_GIT_FILES_SEPARATOR)
  • Targets:
    • common/git/check/no-changes - check that git repo has not
      uncommitted changes
    • common/license/check - check that all files with extension have
      license head

Changes:

  • common/git/check/has-diff - add param SKIP_NEW_FILES to skip
    adding new files to diff

Fix:

  • remove git pull in install/upgrade sections in README

Chore:

  • move strings utils defines to 00-strings.mk
  • refact code to new bash utils functions
  • upgrade jq version to 1.8.2
  • some formatting fixes in README