Add jenkinsfile to verify CSS, fix errors
Some checks failed
Flare Microsystems Git/FlarePublic/gitea-themes/pipeline/pr-master There was a failure building this commit

This commit is contained in:
Vulpovile
2025-01-11 14:22:14 -08:00
parent 6ec0b16c6e
commit dbc99cd70e
6 changed files with 98 additions and 54 deletions

35
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,35 @@
pipeline {
agent any
stages {
stage('Check Indentation') {
steps {
script {
// Check for spaces or mixed indentation
sh '''
if grep -P "^[ ]+" -r path/to/your/css/files; then
echo "Error: Files contain spaces instead of tabs for indentation."
exit 1
fi
if grep -P "^\\t+ +" -r path/to/your/css/files; then
echo "Error: Files contain mixed tabs and spaces for indentation."
exit 1
fi
echo "No indentation errors detected."
'''
}
}
}
stage('Validate CSS Syntax') {
steps {
script {
sh 'stylelint ./**/*.css'
}
}
}
}
}