Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
toc_api
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
toc_api
Commits
fe5c5c48
Commit
fe5c5c48
authored
9 years ago
by
Jacob Rockowitz
Browse files
Options
Downloads
Patches
Plain Diff
Update 'Steps for creating a new release'
parent
c42b2966
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NOTES.md
+44
-88
44 additions, 88 deletions
NOTES.md
config/schema/toc_api.toc_type.schema.yml
+0
-1
0 additions, 1 deletion
config/schema/toc_api.toc_type.schema.yml
src/Plugin/Block/TocBlockBase.php
+1
-0
1 addition, 0 deletions
src/Plugin/Block/TocBlockBase.php
with
45 additions
and
89 deletions
NOTES.md
+
44
−
88
View file @
fe5c5c48
Steps for creating a new release of this module
--------------------------------------------------------------------------------
Steps for creating a new release
--------------------------------
1.
Apply short array syntax
2.
Inspect code
3.
Run tests
4.
Generate and edit release notes
5.
Tag a release
6.
Update project page
7.
Create new release
--------------------------------------------------------------------------------
1.
Cleanup code
2.
Review code
3.
Run tests
4.
Generate release notes
5.
Tag and create a new release
6.
Update project page
# Apply to short array syntax
wget https://raw.githubusercontent.com/thomasbachem/php-short-array-syntax-converter/master/convert.php
find . -name "*.install" -exec php "convert.php" -w "{}" \;
find . -name "*.module" -exec php "convert.php" -w "{}" \;
find . -name "*.php" -exec php "convert.php" -w "{}" \;
find . -name "*.inc" -exec php "convert.php" -w "{}" \;
rm convert.php
1. Cleanup code
---------------
--------------------------------------------------------------------------------
[
Convert to short array syntax
](
https://www.drupal.org/project/short_array_syntax
)
# Inspect code
drush short-array-syntax toc_api
**References**
-
[
Installing Coder Sniffer
](
https://www.drupal.org/node/1419988
)
2. Review code
--------------
**PHPStorm**
[
Online
](
http://pareview.sh
)
-
[
Drupal Development using PhpStorm
](
http
s
://
confluence.jetbrains.com/display/PhpStorm/Drupal+Development+using+PhpStorm#DrupalDevelopmentusingPhpStorm-CoderandPHPCodeSnifferIntegration
)
http://
git.drupal.org/project/toc_api.git 8.x-1.x
**Online**
-
[
pareview.sh
](
http://pareview.sh
)
http://git.drupal.org/project/toc_api.git 8.x-1.x
**[Commandline](https://www.drupal.org/node/1587138)**
[
Commandline
](
https://www.drupal.org/node/1587138
)
# Check Drupal coding standards
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md modules/sandbox/toc_api
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md
,yml
modules/sandbox/toc_api
# Check Drupal best practices
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md modules/sandbox/toc_api
--------------------------------------------------------------------------------
# Run tests
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md,yml modules/sandbox/toc_api
**SimpleTest**
GUI (admin/config/development/testing)
3. Run tests
------------
Command-line (from site root
)
[
SimpleTest
](
https://www.drupal.org/node/645286
)
# Run all test
included this module
# Run all test
s
php core/scripts/run-tests.sh --url http://localhost/d8_dev --module toc_api
**PHPUnit tests**
PHPUnit tests needs to be run individual if this module is placed in a
modules sub-directory (ie module/contrib or modules/sandbox).
-
[
/core/phpunit.xml.dist only finds top-level contrib modules
](
https://www.drupal.org/node/2499239
)
If the above patch is applied or this module is in the main /modules directory.
This command will execute all PHPUnit tests for this module
cd core
php ../vendor/phpunit/phpunit/phpunit --group TocApi
The below commands can be used to execute each individual PHPUnit test.
[
PHPUnit
](
https://www.drupal.org/node/2116263
)
# Execute individual PHPUnit tests.
cd core
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/toc_api/tests/src/Unit/TocFormatterTest.php
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/toc_api/tests/src/Unit/TocTest.php
--------------------------------------------------------------------------------
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/toc_api/tests/src/Unit/TocTest.php
# Generate and edit release notes
4. Generate release notes
-------------------------
Git Release Notes for Drush
(https://www.drupal.org/project/grn)
[
Git Release Notes for Drush
]
(
https://www.drupal.org/project/grn
)
drush release-notes 8.x-1.0-N 8.x-1.x
--------------------------------------------------------------------------------
# Tag a release
drush release-notes 8.x-1.0-VERSION 8.x-1.x
git tag 8.x-1.0-N
git push --tags
git push origin tag 8.x-1.0-N
--------------------------------------------------------------------------------
5. Tag and create a new release
-------------------------------
# Update project page
[
Tag a release
](
https://www.drupal.org/node/1066342
)
Steps for converting README.md to valid and supported HTML for this module's
Drupal.org project page.
git tag 8.x-1.0-VERSION
git push --tags
git push origin tag 8.x-1.0-VERSION
-
[
Convert Markdown to HTML
](
http://daringfireball.net/projects/markdown/dingus
)
-
[
Tidy HTML
](
https://infohound.net/tidy/
)
-
No indent
-
No wrap
-
Manually cleanup
-
Remove
`<html>`
tags.
-
Remove 'Contents of this file'.
-
Update example code and wrap in
`<pre>`
tag.
-
Update project page](https://www.drupal.org/node/2685977/edit)
-
Preview
-
Save
[
Create new release
](
https://www.drupal.org/node/add/project-release/2685977
)
--------------------------------------------------------------------------------
# Create new release
6. Update project page
----------------------
[
Export README.md
](
https://www.drupal.org/project/readme
)
drush readme-export toc_api
-
[
Create Release
](
https://www.drupal.org/node/add/project-release/2685977
)
-
[
Administer releases
](
https://www.drupal.org/node/2685977/edit/releases
)
[
Edit project page
](
https://www.drupal.org/node/2685977/edit
)
This diff is collapsed.
Click to expand it.
config/schema/toc_api.toc_type.schema.yml
+
0
−
1
View file @
fe5c5c48
...
...
@@ -89,4 +89,3 @@ toc_api.toc_type.*:
type
:
ignore
h6
:
type
:
ignore
This diff is collapsed.
Click to expand it.
src/Plugin/Block/TocBlockBase.php
+
1
−
0
View file @
fe5c5c48
...
...
@@ -78,6 +78,7 @@ abstract class TocBlockBase extends BlockBase {
* can all be used as this block's plugin ID.
*
* @return string
* The current TOC block's plugin ID.
*/
protected
function
getCurrentTocId
()
{
return
$this
->
pluginId
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment