- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 959
 
Improve scripts and tool configurations #1693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            32 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      8c4df3c
              
                Add pre-commit hook to run shellcheck
              
              
                EliahKagan f3be76f
              
                Force color when running shellcheck in pre-commit
              
              
                EliahKagan 7dd8add
              
                Suppress SC2086 where word splitting is intended
              
              
                EliahKagan 21875b5
              
                Don't split and glob the interpreter name
              
              
                EliahKagan 0920371
              
                Extract suggest_venv out of the else block
              
              
                EliahKagan e973f52
              
                Use some handy bash-isms in version check script
              
              
                EliahKagan be53823
              
                Have init script treat master unambiguously as a branch
              
              
                EliahKagan e604b46
              
                Use 4-space indentation in all shell scripts
              
              
                EliahKagan 19dfbd8
              
                Make the init script a portable POSIX shell script
              
              
                EliahKagan 7110bf8
              
                Move extra tag-fetching step into init script
              
              
                EliahKagan c7cdaf4
              
                Reduce code duplication in version check script
              
              
                EliahKagan f6dbba2
              
                A couple more script tweaks for clarity
              
              
                EliahKagan 5060c9d
              
                Explain what each step in the init script achieves
              
              
                EliahKagan d5479b2
              
                Use set -u in init script
              
              
                EliahKagan 52f9a68
              
                Make the "all" Makefile target more robust
              
              
                EliahKagan b88d07e
              
                Use a single awk instead of two greps and a cut
              
              
                EliahKagan d36818c
              
                Add a black check to pre-commit
              
              
                EliahKagan 4ba5ad1
              
                Fix typo in comment
              
              
                EliahKagan 5d8ddd9
              
                Use two hooks for black: to check, and format
              
              
                EliahKagan a872d9c
              
                Pass --all-files explicitly so it is retained
              
              
                EliahKagan 9b9de11
              
                Fix the formatting
              
              
                EliahKagan 5d15063
              
                Add "make lint" to lint without auto-formatting
              
              
                EliahKagan 6de86a8
              
                Update readme about most of the test/lint tools
              
              
                EliahKagan f094909
              
                Add BUILDDIR var to doc/Makefile; have tox use it
              
              
                EliahKagan fc96980
              
                Have init script check for GitHub Actions
              
              
                EliahKagan b98f15e
              
                Get tags for tests from original repo as fallback
              
              
                EliahKagan 7cca7d2
              
                Don't print the exact same warning twice
              
              
                EliahKagan e4e009d
              
                Reword comment to fix ambiguity
              
              
                EliahKagan e16e4c0
              
                Format all YAML files in the same style
              
              
                EliahKagan 62c024e
              
                Let tox run lint, mypy, and html envs without 3.9
              
              
                EliahKagan 9e245d0
              
                Update readme: CI jobs not just for "main" branch
              
              
                EliahKagan c2472e9
              
                Note that the init script can be run from Git Bash
              
              
                EliahKagan File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
       Get tags for tests from original repo as fallback
    
    This extends the init script so it tries harder to get version tags: - As before, locally, "git fetch --all --tags" is always run. (This also fetches other objects, and the developer experience would be undesirably inconsistent if that were only sometimes done.) - On CI, run it if version tags are absent. The criterion followed here and in subsequent steps is that if any existing tag starts with a digit, or with the letter v followed by a digit, we regard version tags to be present. This is to balance the benefit of getting the tags (to make the tests work) against the risk of creating a very confusing situation in clones of forks that publish packages or otherwise use their own separate versioning scheme (especially if those tags later ended up being pushed). - Both locally and on CI, after that, if version tags are absent, try to copy them from the original gitpython-developers/GitPython repo, without copying other tags or adding that repo as a remote. Copy only tags that start with a digit, since v+digit tags aren't currently used in this project (though forks may use them). This is a fallback option and it always displays a warning. If it fails, another message is issued for that. Unexpected failure to access the repo terminates the script with a failing exit status, but the absence of version tags in the fallback remote does not, so CI jobs can continue and reveal which tests fail as a result. On GitHub Actions CI specifically, the Actions syntax for creating a warning annotation on the workflow is used, but the warning is still also written to stderr (as otherwise). GHA workflow annotations don't support multi-line warnings, so the message is adjusted into a single line where needed.
- Loading branch information
 
    
    
      commit b98f15e46a7d5f343b1303b55bc4dae2d18bd621
    
  
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.