Skip to content

Commit

Permalink
Auto-merge for PR #28 via VersionBot
Browse files Browse the repository at this point in the history
Use keyType during key generation to create correct key type
  • Loading branch information
resin-io-versionbot[bot] authored Nov 30, 2017
2 parents eac7c03 + b96169f commit c907f6d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## v1.4.2 - 2017-11-30

* Use keyType during key generation to create correct key type #28 [Andreas Fitzek]

## v1.4.1 - 2017-07-11

* Expose version information to build and add --version flag [Will Boyce]
Expand Down
5 changes: 1 addition & 4 deletions resin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ func init() {
if err := viper.BindEnv("allow-env", "SSHPROXY_ALLOW_ENV"); err != nil {
return err
}
if err := viper.BindEnv("sentry-dsn", "SSHPROXY_SENTRY_DSN"); err != nil {
return err
}
return nil
return viper.BindEnv("sentry-dsn", "SSHPROXY_SENTRY_DSN")
}()
if err != nil {
log.Fatal("Initialisation failed", err)
Expand Down
2 changes: 1 addition & 1 deletion sshproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (s *Server) addHostKey(keyType string) error {
}
// generate ssh server keys
log.Printf("Generating private key... (%s)", keyType)
err := exec.Command("ssh-keygen", "-f", keyPath, "-t", "rsa", "-N", "").Run()
err := exec.Command("ssh-keygen", "-f", keyPath, "-t", keyType, "-N", "").Run()
if err != nil {
return err
}
Expand Down
24 changes: 16 additions & 8 deletions versionist.conf.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
var execSync = require('child_process').execSync;
'use strict';

var getAuthor = (commitHash) => {
return execSync(`git show --quiet --format="%an" ${commitHash}`, { encoding: 'utf8' }).replace('\n', '');
}
const execSync = require('child_process').execSync;

const getAuthor = (commitHash) => {
return execSync(`git show --quiet --format="%an" ${commitHash}`, {
encoding: 'utf8'
}).replace('\n', '');
};

const isIncrementalCommit = (changeType) => {
return Boolean(changeType) && changeType.trim().toLowerCase() !== 'none';
};

module.exports = {
// This setup allows the editing and parsing of footer tags to get version and type information,
Expand All @@ -12,7 +20,7 @@ module.exports = {
parseFooterTags: true,
getGitReferenceFromVersion: 'v-prefix',
incrementVersion: 'semver',
updateVersion: (cwd, version, cb) => { cb(); },
editVersion: false,

// Always add the entry to the top of the Changelog, below the header.
addEntryToChangelog: {
Expand All @@ -23,14 +31,14 @@ module.exports = {
// Only include a commit when there is a footer tag of 'change-type'.
// Ensures commits which do not up versions are not included.
includeCommitWhen: (commit) => {
return !!commit.footer['change-type'];
return isIncrementalCommit(commit.footer['change-type']);
},

// Determine the type from 'change-type:' tag.
// Should no explicit change type be made, then no changes are assumed.
getIncrementLevelFromCommit: (commit) => {
if (commit.footer['change-type']) {
return commit.footer['change-type'].trim();
if (isIncrementalCommit(commit.footer['change-type'])) {
return commit.footer['change-type'].trim().toLowerCase();
}
},

Expand Down

0 comments on commit c907f6d

Please sign in to comment.