-
Notifications
You must be signed in to change notification settings - Fork 13
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
Question - Does it have prerelease support? #16
Comments
@PauloGoncalvesBH I can't say that I've tried it, but I don't see why it wouldn't as long as semantic release does what it normally does. by default there is a templated tag that is just |
I try to tag the images differently if it is a pre-release but the module.exports = {
plugins: [
[
'@semantic-release/git',
{
assets: [
'package.json'
],
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
'@codedependant/semantic-release-docker',
{
dockerTags: "${nextRelease.version}".includes('sprint') ? ['beta', '{version}', '{major}-beta', '{major}.{minor}-beta'] : ['latest', '{version}', '{major}-latest', '{major}.{minor}'],
dockerImage: 'image',
dockerRegistry: 'my-registry.net',
dockerProject: 'project',
dockerLogin: false,
dockerPublish: true
}
]
]
} |
You are using the string literal It seems like you are looking for some conditional processing? {
dockerTags: ["{#if prerelease}beta{/if}" ]
} |
Indeed, i'm looking at this kind of preprocessing or maybe a custom function for the creation of the configuration. |
I think its pretty doable to swap out handlebars as the template engine and pre load some string helpers. and expose an option to specify additional helper functions. Then you can pretty much do what you want here. |
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
replaces the simple template engine with handlebars and a set of default helpers BREAKING CHANGE: Use handlebars as template engine. Place holders are now double curlies `{{ }}` resolves: #16
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It works perfectly ! Here is the solution using Handlebars module.exports = {
plugins: [
[
'@semantic-release/git',
{
assets: [
'package.json'
],
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
'@codedependant/semantic-release-docker',
{
dockerTags: ['{{version}}', "{{#if (includes version 'sprint')}}beta{{else}}latest{{/if}}", "{{major}}-{{#if (includes version 'sprint')}}beta{{else}}latest{{/if}}", "{{major}}.{{minor}}{{#if (includes version 'sprint')}}-beta{{/if}}"],
dockerImage: 'image',
dockerRegistry: 'my-registry.net',
dockerProject: 'project',
dockerLogin: false,
dockerPublish: true
}
]
]
} Thank you for the release ! :D |
I'm looking for a semantic-release docker library that allows every release generated from the 'trunk' branch to generate an image tagged latest, and published in the 'beta' branch generate it with a beta tag and with the x.x.x-beta version. (example: 3.4.1-beta.1).
My release configuration is as follows:
https://github.com/ServeRest/ServeRest/blob/d30fcf68d7fe39d4f4f04917ed00ec43b7eb766c/.releaserc.js#L74
This page shows the releases and some generated beta pre-releases:
https://github.com/ServeRest/ServeRest/releases?page=2
The text was updated successfully, but these errors were encountered: