File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name: " Automatically tag new version"
2+
3+ on:
4+ push:
5+ branches:
6+ - " main"
7+ - " **/bugfixes"
8+ paths:
9+ - " setup.php"
10+
11+ jobs:
12+ auto-tag-new-version:
13+ name: " Automatically tag new version"
14+ uses: " glpi-project/plugin-release-workflows/.github/workflows/auto-tag-new-version.yml@v1"
15+ secrets:
16+ github-token: " ${{ secrets.AUTOTAG_TOKEN }}"
Original file line number Diff line number Diff line change 1+ name: " Publish release"
2+
3+ on:
4+ push:
5+ tags:
6+ - '*'
7+
8+ jobs:
9+ publish-release:
10+ permissions:
11+ contents: " write"
12+ name: " Publish release"
13+ uses: " glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"
Original file line number Diff line number Diff line change 1+ module.exports = {
2+ extends: [
3+ ' ../../.stylelintrc.js'
4+ ],
5+ ignoreFiles: [
6+ ' node_modules/**/*' ,
7+ ' vendor/**/*'
8+ ],
9+ } ;
Original file line number Diff line number Diff line change 1+ import glpiEslintConfig from '../../eslint.config.mjs';
2+
3+ const filteredConfig = glpiEslintConfig.filter(config => !config.ignores);
4+
5+ export default [
6+ ...filteredConfig,
7+ {
8+ ignores: [
9+ ' node_modules/*' ,
10+ " public/lib/*" ,
11+ ' vendor/*' ,
12+ ],
13+ } ,
14+ {
15+ // Modules
16+ files: [" public/js/libs.js" ],
17+ languageOptions: {
18+ sourceType: " module"
19+ }
20+ }
21+ ];
Original file line number Diff line number Diff line change @@ -60,16 +60,23 @@ if [ -d "$DEST" ]; then
6060 exit 1
6161fi
6262
63+ read -r -p " Does your plugin include JS/TS files? [y/N] " has_js
64+ read -r -p " Does your plugin include CSS/SCSS/SASS/LESS files? [y/N] " has_css
65+
6366mkdir " $DEST "
6467
65- rsync \
66- --exclude ' .git' \
67- --exclude ' .github/workflows/continuous-integration.yml' \
68- --exclude ' .github/workflows/create-plugin.sh' \
69- --exclude ' plugin.sh' \
70- --exclude ' dist' \
71- --exclude ' README.md' \
72- -a . " $DEST "
68+ rsync_excludes=(
69+ --exclude ' .git'
70+ --exclude ' .github/workflows/continuous-integration.yml'
71+ --exclude ' .github/workflows/create-plugin.sh'
72+ --exclude ' plugin.sh'
73+ --exclude ' dist'
74+ --exclude ' README.md'
75+ )
76+ [[ ! " $has_js " =~ ^[Yy]$ ]] && rsync_excludes+=(--exclude ' eslint.config.mjs.tpl' )
77+ [[ ! " $has_css " =~ ^[Yy]$ ]] && rsync_excludes+=(--exclude ' .stylelintrc.js.tpl' )
78+
79+ rsync " ${rsync_excludes[@]} " -a . " $DEST "
7380
7481pushd " $DEST " > /dev/null
7582
@@ -97,3 +104,4 @@ sed -i '/^[[:space:]]*composer\.lock[[:space:]]*$/d' .gitignore
97104popd > /dev/null
98105
99106echo -e " \033[0;32mPlugin $NAME created under $DEST \033[0m"
107+ echo -e " \033[0;33mDon't forget to add a RELEASE_TOKEN secret in your GitHub repository settings (Settings → Secrets and variables → Actions) with a personal access token having 'contents: write' permission.\033[0m"
You can’t perform that action at this time.
0 commit comments