Skip to content

Allow custom commit hash length when constructing revisionKey #71

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

Merged
merged 1 commit into from
May 2, 2021

Conversation

HeroicEric
Copy link
Contributor

@HeroicEric HeroicEric commented Dec 19, 2018

What Changed & Why

This allows the length of the commit hash that is used to construct the revisionKey be configured. This applies to the git-commit, git-tag-commit, and version-commit data generator types.

Example usage:

ENV['revision-data'] = {
  type: 'git-commit',
  commitHashLength: 40
}

This example would cause the entire commit hash to be used as the revisionKey.

Related issues

Fixes #22

PR Checklist

  • Add tests
  • Add documentation
  • Prefix documentation-only commits with [DOC]

People

@Bockit

Fixes ember-cli-deploy#22

This allows the length of the commit hash that is used to be configured.
This applies to the `git-commit`, `git-tag-commit`, and `version-commit`
data generator types.

Example usage:

```js
ENV['revision-data'] = {
  type: 'git-commit',
  commitHashLength: 40
}
```

This example would cause the entire commit hash to be used as the
`revisionKey`.
@@ -15,6 +15,15 @@ module.exports = {
separator: '+',
filePattern: 'index.html',
versionFile: 'package.json',

commitHashLength: function() {
if (this.type === 'git-commit') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added to ensure that we are not breaking the current behavior even though it is inconsistent.

@atonse
Copy link

atonse commented Nov 27, 2019

Is there any plan to merge this? We've been bitten by this with regards to the SHAs for SourceMaps not matching.

@st-h
Copy link

st-h commented May 1, 2021

Is there any hope at all that this PR will get merged one day? Otherwise I am sadly finding myself on a highway to using forks of almost the entire ember-cli-deploy pipeline, because of little inconsistencies like this one.

Any thing I can do to help getting this merged?

@lukemelia
Copy link
Contributor

Yes, let's get it merged. I will work on this later today.

@lukemelia lukemelia merged commit 1e273de into ember-cli-deploy:master May 2, 2021
@lukemelia
Copy link
Contributor

@st-h and anyone else who would like to help: I've released https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data/releases/tag/v2.0.0-beta.0. I would like a few people to test it before I make it 2.0.0 final.

@st-h
Copy link

st-h commented May 2, 2021

Awesome. Thanks so much. Will report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Ability to configure length of git revision key
4 participants