mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	Merge pull request #574 from return42/fix-lib_static
[mod] make static.build.commit more robust
This commit is contained in:
		
						commit
						33e2599b82
					
				
					 1 changed files with 16 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -4,16 +4,16 @@
 | 
			
		|||
 | 
			
		||||
STATIC_BUILD_COMMIT="[build] /static"
 | 
			
		||||
STATIC_BUILT_PATHS=(
 | 
			
		||||
    searx/static/themes/oscar/css
 | 
			
		||||
    searx/static/themes/oscar/js
 | 
			
		||||
    searx/static/themes/oscar/src/generated/pygments-logicodev.less
 | 
			
		||||
    searx/static/themes/oscar/src/generated/pygments-pointhi.less
 | 
			
		||||
    searx/static/themes/simple/css
 | 
			
		||||
    searx/static/themes/simple/js
 | 
			
		||||
    searx/static/themes/simple/src/generated/pygments.less
 | 
			
		||||
    searx/static/themes/simple/img
 | 
			
		||||
    searx/templates/__common__/searxng-wordmark.min.svg
 | 
			
		||||
    searx/templates/simple/icons.html
 | 
			
		||||
    'searx/static/themes/oscar/css'
 | 
			
		||||
    'searx/static/themes/oscar/js'
 | 
			
		||||
    'searx/static/themes/oscar/src/generated/pygments-logicodev.less'
 | 
			
		||||
    'searx/static/themes/oscar/src/generated/pygments-pointhi.less'
 | 
			
		||||
    'searx/static/themes/simple/css'
 | 
			
		||||
    'searx/static/themes/simple/js'
 | 
			
		||||
    'searx/static/themes/simple/src/generated/pygments.less'
 | 
			
		||||
    'searx/static/themes/simple/img'
 | 
			
		||||
    'searx/templates/__common__/searxng-wordmark.min.svg'
 | 
			
		||||
    'searx/templates/simple/icons.html'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
static_help(){
 | 
			
		||||
| 
						 | 
				
			
			@ -112,6 +112,12 @@ static.build.commit() {
 | 
			
		|||
            git add -v "${built_path}"
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
        # check if any file has been added (in case of no changes)
 | 
			
		||||
        if [ -z "$(git diff --name-only --cached)" ]; then
 | 
			
		||||
            build_msg STATIC "no changes applied / nothing to commit"
 | 
			
		||||
            return 0
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        # check for modified files that are not staged
 | 
			
		||||
        if [ -n "$(git diff --name-only)" ]; then
 | 
			
		||||
            die 42 "themes.all has created files that are not in STATIC_BUILT_PATHS"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue