Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Single new project #45

Merged
merged 4 commits into from
Dec 12, 2018
Merged

Fix Single new project #45

merged 4 commits into from
Dec 12, 2018

Conversation

hipstersmoothie
Copy link
Collaborator

What Changed

If last release is a commit sha, calc bump using SHA and bump current calculated version (most likely from package.json).

Why

When in a new project with no releases but with a version in package.json

  1. Get latest release, it's a SHA
  2. getCurrentVersion defaults to package.json version when it doesn't find a suitable tag
  3. the currentVersion (unpublished) made it way to changelog creation. Where it uses the last release as the from in auto changelog
  4. Since that version only exists in the package.json, git log creation would fail

now we check if the last release looks like a version number, and if it doesn't use the first commit to calculate a version bump and then bump the currentVersion with it.

Todo:

  • Add tests
  • Add docs
  • Add SemVer label

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #45 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   76.23%   76.36%   +0.13%     
==========================================
  Files          13       13              
  Lines         871      876       +5     
  Branches      105      106       +1     
==========================================
+ Hits          664      669       +5     
  Misses        188      188              
  Partials       19       19
Impacted Files Coverage Δ
src/github-release.ts 94.83% <100%> (+0.17%) ⬆️
src/main.ts 24.1% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7fb0ac...b9e474a. Read the comment docs.

src/github-release.ts Outdated Show resolved Hide resolved
adierkens and others added 2 commits December 11, 2018 16:10
Co-Authored-By: hipstersmoothie <hipstersmoothie@users.noreply.github.com>
@hipstersmoothie hipstersmoothie merged commit 8aa7aa5 into master Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants