Giter Club home page Giter Club logo

fastlane-plugin-changelog's Introduction

changelog plugin

fastlane Plugin Badge Build Status Twitter: @hello_paja

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-changelog add it to your project by running:

fastlane add_plugin changelog

About changelog

This plugin is inspired by and based on Keep a CHANGELOG project. Keep a CHANGELOG proposes a standardised format for keeping change log of your project repository in CHANGELOG.md file. This file contains a curated, chronologically ordered list of notable changes for each version of a project in human readable format.

Since Keep a CHANGELOG project proposes a well-defined structure with sections (e.g.: [Unreleased], [0.3.0]) and subsections (Added, Changed, Deprecated, Removed, Fixed, Security) it opens up an opportunity to automate reading from/writing to CHANGELOG.md with fastlane.

Actions

fastlane-plugin-changelog consists of 3 actions enabling you to manipulate CHANGELOG.md from fastlane.

πŸ“– read_changelog

Reads the content of a section from your project's CHANGELOG.md file. CHANGELOG.md must follow structure proposed by Keep a CHANGELOG project.

read_changelog	# Reads the Unreleased section from CHANGELOG.md in your project's folder
read_changelog(
  changelog_path: './custom_folder/CHANGELOG.md',	# Specify path to CHANGELOG.md
  section_identifier: '[Unreleased]',	# Specify what section to read
  excluded_markdown_elements: ['-', '###']	# Specify which markdown elements should be excluded
)

Use the output of this action in conjunction with for example pilot to upload your change log to TestFlight or with github_release to create a new release on Github.

πŸ“ update_changelog

Updates section identifier of your project's CHANGELOG.md file.

update_changelog(
  section_identifier: '[Build 123]', # Specify what section to update
  updated_section_identifier: 'Build 321' # Specify new section identifier
)

πŸ”– stamp_changelog

Stamps the Unreleased (see How can I minimize the effort required?) section with provided identifier in your project CHANGELOG.md file and sets up a new Unreleased section above it. Additionally, you can provide an optional git_tag param, specifing git tag associated with this section. stamp_changelog will then create a link to diff between this and previous section's tag on GitHub or Bitbucket. This will enable you to quickly get to comparison between two tags.

stamp_changelog(
  section_identifier: 'Build XYZ', # Specify identifier to stamp the Unreleased section with 
  git_tag: 'bXYZ', # Specify reference to git tag associated with this section
  should_stamp_date: true, # Specify whether the current date as per the stamp_datetime_format should be stamped to the section identifier (default is `true`)
  stamp_datetime_format: '%FT%TZ' # Specify strftime format string to use for the date in the stamped section (default `%FZ`)
)

πŸ€– Moreover, if you are using danger-changelog plugin, you can leverage placeholder_line string paramater. placeholder_line string will be ignored when stamping an existing section and copied into [Unreleased] section. This will help contributors to your project to see where changelog changes should be added (see feature request).

😁 emojify_changelog

Emojifies the output of read_changelog action. When you share changelog with the rest of your team on e.g.: Slack channel, it's nice to sprinkle your subsections with a bit of visuals so it immediately catches eyes of your teammates. emojify_changelog uses the output of read_changelog action to append an emoji to known subsections, for example:

Added:
- New awesome feature

Changed:
- Onboarding flow 

Fixed:
- Fix Markdown links 

Removed:
- User tracking 

Work In Progress:
- Sales screen

Security:
- Enable SSL pinning

Deprecated:
- Obsolete contact screen

emojifies into:

*Added* 🎁:
β€’ New awesome feature

*Changed* ↔️:
β€’ Onboarding flow UI

*Fixed* βœ…:
β€’ Fix Markdown links 

*Removed* 🚫:
β€’ User tracking 

*Work In Progress* 🚧:
β€’ Sales screen

*Security* πŸ”’:
β€’ Enable SSL pinning

*Deprecated* πŸ’¨:
β€’ Obsolete contact screen

Example of use:

changelog = read_changelog # Read changelog
pilot(changelog: changelog) # Send binary and changelog to TestFlight
emojified_changelog = emojify_changelog # Emojify the output of `read_changelog` action
slack(message: "Hey team, we have a new build for you, which includes the following: #{emojified_changelog}") # share on Slack

NOTE: do not send emojified changelog to iTunes Connect as it cannot handle emojis.

Example

As a developer you have to remember to keep your CHANGELOG.md up-to-date with whatever features, bug fixes etc. your repo contains and let fastlane do the rest.

lane :beta do
  build_number = get_build_number # Get build number
  gym # Compile
  
  changelog = read_changelog # Read changelog
  pilot(changelog: changelog) # Send binary and changelog to TestFlight
  
  stamp_changelog(section_identifier: "Build #{build_number}") # Stamp Unreleased section with newly released build number
end

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.

fastlane-plugin-changelog's People

Contributors

bellebethcooper avatar danielgomezrico avatar dusek avatar isadon avatar jgarber avatar mathroule avatar pajapro avatar rishabhtayal avatar rotemitz avatar yjosephides avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fastlane-plugin-changelog's Issues

Multilanguage changelog

Hi,

Is there any support for having localizable changelog? is there any other way than keeping multiple md files and iterating through them in custom lanes for read and stamp actions?

Thank you

stamp_changelog: stamp_date expects a string yet docs say it’s a boolean.

The documentation invoked via: fastlane action stamp_changelog gives that the default for stamp_date is true a boolean. When running the action though it seems the action is expecting a String. Furthermore when building and passing any string "false" or "12.16.2020" for stamp_date the action always chooses to include the action's pre-formatted date.

Better integration with `commit_version_bump`

Currently someone who uses increment_build_number together with commit_version_bump has a little rough time when using stamp_changelog. E.g. consider the following code:

    increment_build_number
    stamp_changelog(section_identifier: "#{get_version_number} (#{get_build_number})")
    commit_version_bump

commit_version_bump will complain that:

[!] Found unexpected uncommited changes in the working directory. Expected these files to have 
changed: 
appname.xcodeproj/project.pbxproj
appname/Info.plist
appnameTests/Info.plist
appnameUITests/Info.plist.
But found these actual changes: 
CHANGELOG.md
appname.xcodeproj/project.pbxproj
appname/Info.plist
appnameTests/Info.plist
appnameUITests/Info.plist.
Make sure you have cleaned up the build artifacts and 
are only left with the changed version files at this stage in your lane, and don't touch the 
working directory while your lane is running. You can also use the :force option to bypass this 
check, and always commit a version bump regardless of the state of the working directory.

If we git_add(path: 'CHANGELOG.md') before committing version bump, the same error will happen.

If we add force: true parameter to the commit_verison_bump on its own, it avoids the error, but leaves the changes to CHANGELOG.md caused by stamping as uncommitted changes.

Only combination of both is a working workaround:

    increment_build_number
    stamp_changelog(section_identifier: "#{get_version_number} (#{get_build_number})")
    git_add(path: 'CHANGELOG.md')
    commit_version_bump(force: true)

I think a better solution would be to change fastlane itself to introduce e.g. a VERSION_BUMP_PATHS lane context value. Actions like fastlane's own increment_build_number and increment_version_number, or this plugin's stamp_changelog, could then register files with changes related to bumping version. The commit_version_bump action would then use this shared lane context value, instead of its hardcoded list of files, to determine which files need committing for the version bump.

I will file an issue with fastlane proposing this enhancement which fastlane-plugin-changelog could then take advantage of.

how to write message??

hi, i practice these plugin and write fastfile that

lane :release_testflight do
    
    changelog = read_changelog
  
    stamp_changelog(
        section_identifier: "#{get_version_number}", # Specify identifier to stamp the Unreleased section with
        git_tag: "Ver #{build_number}", # Specify reference to git tag associated with this section
        stamp_datetime_format: '%FT%TZ' # Specify strftime format string to use for the date in the stamped section (default `%FZ`)
    )
    
  end

like these. but when i run fastlane, i think there are some missunderstanding.

Added:

  • New awesome feature

Changed:

  • Onboarding flow

Fixed:

  • Fix Markdown links

Removed:

  • User tracking

these template is not show in changeLog.md.

Should I write this in line with the template that I personally illustrated here on changelog.md?

what is real mean of read_changelog??
What's the difference between just handwriting on the git readme and this plugin?

Seems to add an additional line on the end of the file

Everytime I run the following command it duplicates the last line.

    stamp_changelog(
        changelog_path: changelog_location,	# Specify path to CHANGELOG.md
        section_identifier: currentVersion,
        git_tag: currentVersion, # Specify reference to git tag associated with this section
        should_stamp_date: true, # Specify whether the current date as per the stamp_datetime_format should be stamped to the section identifier (default is `true`)
        stamp_datetime_format: '%F', # Specify strftime format string to use for the date in the stamped section (default `%FZ`)
        placeholder_line: new_unreleased_changelog
    )
    ```

Asks to create changelog.md when specifying changelog_path

I have my CHANGELOG.md file outside the project to share across iOS and Android.
When stamping it, it asks me to create the file in the default location because it can't find it:
fastlane run stamp_changelog(changelog_path: '../../CHANGELOG.md', ....)

As a workaround I've created a dummy file in that place, but it would be good to not have to.

Documentation error for read_changelog example

In the README example given, the excluded_markdown_elements shows double quotes within the brackets which causes the plugin to fail. If a list of elements is given, remove the single quotes on the outside of the brackets and use single quotes and commas to support the markdown elements to exclude.

BAD:
read_changelog(
changelog_path: './custom_folder/CHANGELOG.md', # Specify path to CHANGELOG.md
section_identifier: '[Unreleased]', # Specify what section to read
excluded_markdown_elements: '["###"]' # Specify which markdown elements should be excluded
)

GOOD:
read_changelog(
changelog_path: './custom_folder/CHANGELOG.md', # Specify path to CHANGELOG.md
section_identifier: '[Unreleased]', # Specify what section to read
excluded_markdown_elements: ['###'] # Specify which markdown elements should be excluded
)

Unable to load plugin

Hello,

I am getting the following error on fastlane:

Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane_core/lib/fastlane_core/ui/interface.rb:150:in `user_error!': [!] Plugin 'changelog' was not properly loaded, make sure to follow the plugin docs for troubleshooting: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md (FastlaneCore::Interface::FastlaneError)
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane_core/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/runner.rb:161:in `rescue in trigger_action_by_name'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/runner.rb:155:in `trigger_action_by_name'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
	from Fastfile:29:in `block (2 levels) in parsing_binding'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:40:in `run!'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/gems/fastlane-2.28.8/bin/fastlane:20:in `<top (required)>'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/bin/fastlane:22:in `load'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/bin/fastlane:22:in `<main>'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
	from /Users/hernangonzalez/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'

I am using latest release. Any ideas what could be the root? I am not getting much info from the logs :/

Thank you,
H.

Exclude/Preserve lines when stamp_changelog

I setup the changelog plugin of the gem danger which enforces a certain changelog style which is very suitable. But it forces me to keep the line * Your contribution here. directly under the ## [Unreleased] section of my changelog. This is very good so contributer know where to add new changes. On the other hand I

  1. Don't want to exclude this line from my changelog of a certain version when I call stamp_changelog
  2. I want to preserve this line in my ## [Unreleased] section when I call stamp_changelog

I propose to add the option to Exclude a certain text when stamping a changelog version and preserve this exact text in the unreleased section.

New action to combine changelogs

Hi,

Not sure if that would interest you, but our workflow requires us to sometimes combine changelog that have a section prefix in common.

For example:

  • we stamp the changelog for each dev build with the identifier <version>-<build number>
  • when we release the full version we want the complete changelog for that version, which means combining the changelog for all sections that start with version

We already have a custom action that does this, but felt like it would belong more with your plugin. If that interests you, I can make a pull request with our code?

Thanks!

stamp_changelog.rb:39: undefined method `empty?' for nil:NilClass

I get the above error with running the stamp_changelog action in a lane:

  desc "Test Change Log maintenance"
  lane :changelog do
    increment_build_number
    changelog = read_changelog
    badge
    # `gym` would be normally here
    clean_build_artifacts
    reset_git_repo(force: true, files: [
        'appname/Assets.xcassets/AppIcon.appiconset/',
    ])
    stamp_changelog(section_identifier: "#{get_version_number} (#{get_build_number})")
    commit_version_bump
  end

Indeed stamp_changelog.rb:39 contains an empty? test.

Stack:

  • macOS: 10.11.6
  • ruby: 2.0.0p648 + rbenv
  • fastlane: 1.97.2
  • fastlane-plugin-changelog: 0.2.0

stamp_changelog not stamp build date near a title

'Keep a CHANGELOG' example uses the following pattern for titles : "## [0.3.0] - 2015-12-03", but the plugin does not paste build date after the bracket. I think it should do it by default. Alternative maybe there is an option for stamp_changelog method missed.

Android Usage?

Hi,
the iOS workflow looks quite straight forward to me but unf. O don't really get how I can integrate this into my android fastlane deployment to set up automated changelog texts per build

Thanks,
Toni

Github comparison link tag is inverted

Output:

INFO [2018-10-19 14:37:05.70]: ----------------------------------------
INFO [2018-10-19 14:37:05.70]: --- Step: Verifying fastlane version ---
INFO [2018-10-19 14:37:05.70]: ----------------------------------------
INFO [2018-10-19 14:37:05.70]: Your fastlane version 2.107.0 matches the minimum requirement of 1.110.0  βœ…
INFO [2018-10-19 14:37:05.70]: ------------------------------
INFO [2018-10-19 14:37:05.70]: --- Step: default_platform ---
INFO [2018-10-19 14:37:05.70]: ------------------------------
INFO [2018-10-19 14:37:05.70]: Driving the lane 'ios add_tag' πŸš€
INFO [2018-10-19 14:37:05.70]: --------------------------------
INFO [2018-10-19 14:37:05.70]: --- Step: get_version_number ---
INFO [2018-10-19 14:37:05.70]: --------------------------------
INFO [2018-10-19 14:37:05.84]: -----------------------------
INFO [2018-10-19 14:37:05.84]: --- Step: stamp_changelog ---
INFO [2018-10-19 14:37:05.84]: -----------------------------
INFO [2018-10-19 14:37:05.84]: Starting to read [Unreleased] section from './CHANGELOG.md'
INFO [2018-10-19 14:37:05.84]: Finished reading [Unreleased] section from './CHANGELOG.md'
INFO [2018-10-19 14:37:05.84]: Starting to update [Unreleased] section of './CHANGELOG.md'
INFO [2018-10-19 14:37:05.84]: Old section identifier: ## [Unreleased]
INFO [2018-10-19 14:37:05.84]: New section identifier: ## [3.11.0] - 2018-10-19
INFO [2018-10-19 14:37:05.85]: Successfuly updated ./CHANGELOG.md
INFO [2018-10-19 14:37:05.85]: Created [Unreleased] placeholder section
INFO [2018-10-19 14:37:05.85]: Created a link for comparison between 3.10.5 and 3.11.0 tag
INFO [2018-10-19 14:37:05.85]: Successfuly stamped 3.11.0 in ./CHANGELOG.md
INFO [2018-10-19 14:37:05.85]: ------------------------
INFO [2018-10-19 14:37:05.85]: --- Step: git_commit ---
INFO [2018-10-19 14:37:05.85]: ------------------------
INFO [2018-10-19 14:37:05.85]: $ git commit -m Stamp\ 3.11.0\ in\ CHANGELOG.md ./CHANGELOG.md
INFO [2018-10-19 14:37:05.91]: β–Έ [component 0453ce39] Stamp 3.11.0 in CHANGELOG.md
INFO [2018-10-19 14:37:05.91]: β–Έ 1 file changed, 3 insertions(+)
INFO [2018-10-19 14:37:05.91]: Successfully committed "["./CHANGELOG.md"]" πŸ’Ύ.
INFO [2018-10-19 14:37:05.92]: -------------------------
INFO [2018-10-19 14:37:05.92]: --- Step: add_git_tag ---
INFO [2018-10-19 14:37:05.92]: -------------------------
INFO [2018-10-19 14:37:05.92]: Adding git tag '3.11.0' 🎯.
INFO [2018-10-19 14:37:05.92]: $ git tag -am 3.11.0\ \(fastlane\) 3.11.0

console tell me old tag and new tag is right(old: 3.10.5, new: 3.11.0), but I got a wrong link:
https://github.com/bearyinnovative/Mandrake/compare/3.11.0...3.10.5.

The tags is inverted.

I saw the codes here, previous_tag and git_tag is right number.I'm confused why the result link is wrong.

Incorrect tag name in compare links at bottom

Hi and thanks for your Fastlane plugin. But I encountered some issue using it.

My command is:

stamp_changelog(
  section_identifier: '1.7.4',
  git_tag: '1.7.4'
)

Before execution:

## [Unreleased]
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies

[Unreleased]: https://github.com/GlobalSport/mycoach-player-android/compare/1.7.3...HEAD

After execution:

## [Unreleased]

## [1.7.4] - 2016-11-09
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies

[Unreleased]: https://github.com/GlobalSport/mycoach-player-android/compare/1.7.3...HEAD
[1.7.4]: https://github.com/GlobalSport/mycoach-player-android/compare/HEAD...1.7.4

WARNING: No changes in [Unreleased] section to stamp!

How can I generate the latest Unreleased Change Log?

here is the git commit log
WX20191025-203651

here is Fastfile:

lane :getVersion do
    version_number = get_version_number(target: "XAGApp")
    build_number = get_build_number(xcodeproj: "XAGApp.xcodeproj")
    version_number + "(" + build_number + ")"
  end
  
  lane :test do
    version = getVersion
    stamp_changelog(section_identifier: "Build #{version}")
  end

here the change log after 'fastlane test'
WX20191025-195349

can you help me ?
or Can this tool automatically generate change log files?
mannually write log in CHANGELOG.md file?

stamp_changelog action duplicates the last line in the [Unreleased] section

When you run the stamp_changelog action the last line of the [Unreleased] section gets duplicated into the newly stamped section.

Before

## [Unreleased]

### Added

- Some cool stuff
- Awesome stuff
- Amazing stuff!

After stamp_changelog(section_identifier: 1.0.0)

## [Unreleased]

## [1.0.0] - 2020-01-31

### Added

- Some cool stuff
- Awesome stuff
- Amazing stuff!
- Amazing stuff!

Workflow with version change happen outside fastlane

Thanks for the plugin. It will help to create nice changelogs for us.

Our versioning flow is a bit different though. We use release branches that first increment the package.json (and add a tag) and then call fastlane.
And since a fastlane deploy could fail for a number of reasons it would be bad to have a stamped changelog before the deploy succeeded.

Do you have any recommendation to handle such flow? One solution I could think of would be a git amend at the end of a successful deploy, which adds the stamped changelog or revert the last commit that tagged the version.

stamp_changelog not adding tags correctly

When using stamp_changelog with a Git tag, the tag does not seem to be appended correctly.

Stamping the following change log with stamp_changelog(section_identifier: "1.0 (27)", git_tag: "example") results in the change log in the bottom of this post.

# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
- Testing

## [1.0 (26)] - 2016-10-31
- Adds build for feature/demo branch. Testing fastlane setup.

## [1.0 (25)] - 2016-10-31
- Tests distribution using fastlane.

## [1.0 (24)] - 2016-10-30
- Tests distribution of builds with fastlane.

## [1.0 (21)] - 2016-10-30
- Attempts automating build process.

Below is the result of stamping the above change log with a section identifier of "1.0 (27)" and a Git tag of "example".

# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.0 (27)] - 2016-10-31
- Testing

## [1.0 (26)] - 2016-10-31
- Adds build for feature/demo branch. Testing fastlane setup.

## [1.0 (25)] - 2016-10-31
- Tests distribution using fastlane.

## [1.0 (24)] - 2016-10-30
- Tests distribution of builds with fastlane.

## [1.0 (21)] - 2016-10-30
- Attempts automating build process.
1.0 (27)example- Attempts automating build process.

Generate CHANGELOG.md

While installing fastlane-plugin-changelog it should check whether CHANGELOG.md is present in project folder. If not, generate one with predefined structure.

Incorrect use of line separator

Hi

Using your plugin with LF in CHANGELOG.md as line separator is ok, but using CR or CRLF give incorrect result.

Source CHANGELOG.md:

## [Unreleased]
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies

Command:

stamp_changelog(
  section_identifier: '1.7.4'
)

Using LF => OK:

## [Unreleased]

## [1.7.4] - 2016-11-09
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies

Using CRLF => KO:

## [Unreleased]

## [1.7.4]
 - 2016-11-09
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies

Using CR => KO:

## [Unreleased]

## [1.7.4]

## [1.7.4] - 2016-11-09
### Added
- Use Fastlane

## [1.7.3] - 2016-11-04
### Changed
- Set background as white

## [1.7.2] - 2016-11-04
### Fixed
- Fix chart layout

### Changed
- Update dependencies
 - 2016-11-09

[Fastlane.swift] No return value

When installing the plugin in a Fastlane.swift project no return values are provided.

public func emojifyChangelog() {
let args: [RubyCommand.Argument] = []
let command = RubyCommand(commandID: "", methodName: "emojify_changelog", className: nil, args: args)
  _ = runner.executeCommand(command)
}

public func readChangelog(changelogPath: String = "./CHANGELOG.md",
                          sectionIdentifier: String = "[Unreleased]",
                          excludedMarkdownElements: [String] = ["###"]) {
let changelogPathArg = RubyCommand.Argument(name: "changelog_path", value: changelogPath, type: nil)
let sectionIdentifierArg = RubyCommand.Argument(name: "section_identifier", value: sectionIdentifier, type: nil)
let excludedMarkdownElementsArg = RubyCommand.Argument(name: "excluded_markdown_elements", value: excludedMarkdownElements, type: nil)
let array: [RubyCommand.Argument?] = [changelogPathArg,
sectionIdentifierArg,
excludedMarkdownElementsArg]
let args: [RubyCommand.Argument] = array
.filter { $0?.value != nil }
.compactMap { $0 }
let command = RubyCommand(commandID: "", methodName: "read_changelog", className: nil, args: args)
  _ = runner.executeCommand(command)
}

The Diff Links dont work for GitLab

GitLab uses the same format as GitHub: https://gitlab.com/{author}/{project}/-/compare/{oldTag}...{newTag}
GitLab (and BitBucket, I believe) can also be slef-hosted so the domain in the URL can vary.
I suggest adding a param to indicate BitBucket (with a fallback check for the bitbucket domain) and assume GitHub format is the default.
The last line should be validated that it matches the format in order to not add junk at the end, I ended up with:

[1.1.0]: https://gitlab.com/{author}/{project}/-/compare/v1.0.0..v1.1.0.v1.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.