semantic-release / exec Goto Github PK
View Code? Open in Web Editor NEW:shell: semantic-release plugin to execute custom shell commands
License: MIT License
:shell: semantic-release plugin to execute custom shell commands
License: MIT License
Hello,
We are using exec to customize publish stage. I was wondering if is there any way to get 'pgkRoot' parameter which was defined in package.json and publish from that folder?
Thanks.
I am trying to understand how/where the scripts run. I've got a very simple shell script for testing that I want to run during any step. I've tried several.
Below is my releaserc file as well as the contents of the script. I can see where the output of semantic release shows where it runs but there is never any output from the script. No output from the echo command or version.txt is ever created. Also, notice that I do not have "./" in front of my version.sh because this runs on a windows machine and errors out when it is included. Any tips are appreciated.
releaserc
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/exec", {
"publishCmd": "version.sh ${nextRelease.version}"
}],
["@semantic-release/git", {
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
Shell script
#!/bin/bash
VERSION=$1
echo "This is the version from semantic release"
echo $VERSION >> version.txt
It will be useful if there no release, then exec "noReleaseCmd".
You can do with "noReleaseCmd":
notify developers if you want.
throw error to stop semantic-release and CI flow
Is it possible?
Thanks for help!
In Azure DevOps certain variables can be set by echoing specific commands to the log.
For example, you can change the current build number to the release number from semantic-release by:
echo ##vso[build.updatebuildnumber]${nextRelease.version}
I am currently doing this inside of the @semantic-release/exec
plugin. But as nothing is returned from the call this message gets logged:
The command echo ##vso[build.updatebuildnumber]${nextRelease.version} wrote invalid JSON to stdout. The stdout content will be ignored.
This, in turn, raises an error with azure pipelines because special characters are not allowed. (You can see it here)
I would propose to:
The command echo ##vso[build.updatebuildnumber]1.2.3 wrote invalid JSON to stdout. The stdout content will be ignored.
would not raise the error)Branch | Build failing 🚨 |
---|---|
Dependency | semantic-release |
Current Version | 15.9.5 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
repositoryUrl
to https (b895231)The new version differs by 3 commits.
b895231
fix: do not convert ssh repositoryUrl
to https
8b8e40c
docs(plugins): add semantic-release-firefox
06695a1
chore(package): update xo to version 0.22.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency |
sinon
|
Current Version | 5.0.9 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
4313d2d
Update docs/changelog.md and set new release id in docs/_config.yml
e21c92a
Add release documentation for v5.0.10
41d0dcb
5.0.10
928379c
Update History.md and AUTHORS for new release
5ca48d3
Merge pull request #1802 from ifrost/feature/restore-default-sandbox-fake-timers
087bc1c
Cache reverse function
d19a4c0
Add issue number
6799e1c
Use fakeTimers in the default sandbox
8b6f8a8
Revert spied fakeTimers to original state
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Trying to access one of the variables shown in the example:
"publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"
in this project like so:
"success": [
"@semantic-release/github",
[
"@semantic-release/exec",
{
"successCmd": "npm start -- --branch ${options.branch}"
}
]
],
when this step run, I see this in the travis run:
[11:16:33 PM] [semantic-release] › ℹ Start step "success" of plugin "@semantic-release/exec"
[11:16:33 PM] [semantic-release] [@semantic-release/exec] › ℹ Call script npm start -- --branch
> @kibibit/[email protected] start /home/travis/build/Kibibit/announce-it
> node ./bin/announce-it-cli.js "--branch"
which looks like the template variable wasn't injected there. I tried looking for a test in the exec.test.js
file to look if this is tested (and see if the variable name is wrong in the docs) but couldn't find anything.
Is there a variable I can inject with the branch name? options.branch
?
Thanks!
semantic-release
: ^16.0.0-beta.22
@semantic-release/exec
: ^3.4.0-beta.2
1.2.1
to 1.3.0
.This version is covered by your current version range and after updating it in your project the build failed.
ava is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
t.throws()
and t.throwsAsync()
. If you'd set a code
expectation to a number we never actually checked that the thrown error had such a code! Thanks to @qlonik for both spotting and fixing this. 82daa5eclearTimeout()
, you'd break AVA. That's now been fixed. 40f331cYou can now use require()
in ava.config.js
files to load non-ES modules. 334e15b
Thank you @itaisteinherz, @jdalton, @kagawagao, @KompKK, @SleeplessByte, @Chrisyee22 and @qlonik for helping us with this release. We couldn't have done this without you!
We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.
The new version differs by 12 commits.
b0fadb4
1.3.0
9600966
Bump dependencies
82daa5e
Assert on expected error code, even when a number
1e3b072
Document timeout
configuration
d97f11d
Improve pronunciation examples
40f331c
Fix unbound reference to clearTimeout
334e15b
Support require() in config files
5751226
Added few tests for lib/chalk.js
7d10446
Fix link to Babel recipe
565822e
Update esm package detection
2fce19f
Remove the typings
field in package.json
d066f6f
Recognize snapshot files as source files
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@semantic-release/error
, semantic-release
).github/workflows/release.yml
actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/test.yml
actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
package.json
@semantic-release/error ^3.0.0
aggregate-error ^3.0.0
debug ^4.0.0
execa ^5.0.0
lodash ^4.17.4
parse-json ^5.0.0
ava 5.1.0
nyc 15.1.0
semantic-release 21.1.2
sinon 17.0.1
stream-buffers 3.0.2
xo 0.39.1
semantic-release >=18.0.0
node >=14.17
My application has a Helm chart that is used to deploy my app to Kubernetes whenever I do a release. It is located in a subdirectory called deploy
in my root project directory.
app/
-- package.json
-- deploy/
---- Chart.yaml (want to sync this with package.json)
Is there a way to have semantic-release
update the version
field in that file (to be synced with the updated package.json
version) as part of its process and also include it as part of the chore(release): x.x.x [skip ci]
commit changeset that it generates?
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>semantic-release/.github)
Hello,
I need to update the change log of each commit with information from another source, for that i need to execute a script for each commit.
It's possible to execute the script with each commit?
If it's possible, then increment the change log information from each commits with information from another source its possible?
Is it possible to configure this plugin via the command line and not a config file?
Lost a couple of hours on this...
Had the configuration in .releaserc.json and the plugin was not loaded. As soon as I moved the config to package.json it worked
this post helped
I would like to use semantic-release to publish a PowerShell module. For that, I would like to write the cmd
in PowerShell and execute it with pwsh
, through the shell
option that can be passed to execa / child_process. Currently I need to manually call pwsh -c '...'
, which makes quoting difficult.
Part of semantic-release/semantic-release#1692
.travis.yml
.github/workflows/{test,release}.yml
(copy from https://github.com/semantic-release/npm/tree/master/.github/workflows)package-lock.json
from .gitignore
.npmrc
and .yarnrc
REPO NAME HERE
;): [![Build Status](https://github.com/semantic-release/[REPO NAME HERE]/workflows/Test/badge.svg)](https://github.com/semantic-release/[REPO NAME HERE]/actions?query=workflow%3ATest+branch%3Amaster)
package-json.lock
test:ci
script which doesn't run lint
pre script
renovate config
"renovate": {
"extends": [
"github>semantic-release/.github"
]
}
I know I can provide a failCmd
, and I'll do that, but it seems to me the default failure output could be improved. It prints the stdout stringified, which is an assault on the eyes...
Aside from that it's not 100% straightforward how to deal with quoting in making a failCmd
that will print the output as-is.
shortMessage: 'Command failed with exit code 1: ./run release 7.0.0',
command: './run release 7.0.0',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout:
'Login Succeeded\nmaster\njcore/clarity\n*********************************************\nSuccessfully compiled 414 files with Babel.\nSuccessfully compiled 714 files with Babel.\nHappy[1]: Version: 5.0.1. Threads: 4\nHappy[1]: All set; signaling webpack to proceed.\nHash: \u001b[1m8a4bddc52b72ec4bb568\u001b[39m\u001b[22m\nVersion: webpack \u001b[1m4.28.0\u001b[39m\u001b[22m\nTime: \u001b[1m64663\u001b[39m\u001b[22mms\nBuilt at: 09/30/2020 \u001b[1m10:20:58 PM\u001b[39m\u001b[22m\n \u001b[1mAsset\u001b[39m\u001b[22m \u001b[1mSize\u001b[39m\u001b[22m \u001b[1mChunks\u001b[39m\u001b[22m \u001b[1m\u001b[39m\u001b[22m \u001b[1m\u001b[39m\u001b[22m \u001b[1mChunk Names\u001b[39m\u001b[22m\n \u001b[1m\u001b[32m0_e0568fa039ca1be3a035.js\u001b[39m\u001b[22m 46.9 KiB \u001b[1m0\u001b[39m\u001b[22m \u001b[1m\u001b[32m[emitted]\u001b[39m\u001b[22m \n \u001b[1m\u001b[32m0_e0568fa039ca1be3a035.js.map\u001b[39m\u001b[22m 123 KiB \u001b[1m0\u001b[39m\u001b[22m \u001b[1m\u001b[32m[emitted]\u001b[39m\u001b[22m \n \u001b[1m\u001b[32m11_5b4b19d4d23cb7309e43.js\u001b[39m\u001b[22m 71.6 KiB \u001b[1m11\u001b[39m\u001b[22m \u001b[1m\u001b[32m[emitted]\u001b[39m\u001b[22m \n \u001b[1m\u001b[32m11_5b4b19d4d23cb7309e43.js.map\u001b[39m\u001b[22m 300 KiB \u001b[1m11\u001b[39m\u001b[22m \u001b[1m\u001b[32m[emitted]\u001b[39m\u001b[22m \n \u001b[1m\u001b[32m12_1530a720f145ffeffdf4.js\u001b[39m\u001b[22m 26.1 KiB \u001b[1m12\u001b[39m\u001b[22m \u001b[1m\u001b[32m[emitted]\u001b[39m\u001b[22m \n \u001b[1m\u001b[32m12_1530a720f145ffeffdf4.js.map\u001b[39m\u001b[22m 56.2 KiB \u001b[1m12\u001b[39m\u001b[22m \u001
I would like to add an entry in the releases array, so it could be referenced in the GitHub releases. Is it possible with this plugin?
Hi and thanks for helping,
I would like to update the version number as well in server/package.json
while publishing with semantic-release
How can I do using @semantic-release/exec
, it seems that only the publish
step is having the version while I need to prepare
it first and commit it with @semantic-release/git
.
I am struggling to get semantic-release working within my gradle project.
I used to use gradle-release-plugin
, but to keep it, I need to have the ${nextRelease.version}
during the prepare step.
I was able to run it during the release
step, but then I do not get the change included by the plugin in the release. The plugin will:
It's not the first time I ask this myself so I ask you now:
Why from @semantic-release/exec prepare step we can't have the releaseVersion
available when a plugin can have it during the prepare step?
The next semantic version can be obtained in a hack way, by doing a dry run and using gre/sed to extract the version from the output; is there a better way of doing that ? Similarly, is there a way to use semantic-release
to obtain the current version ?
"@semantic-release/exec#semantic-release@>=15.9.0 <17.0.0" doesn't satisfy found match of "[email protected]"
@semantic-release/exec@beta
is compatible with semantic-release@beta
(eg: 16.0.0-beta.45
).
This appears to also have been an issue for the release notes plugin: semantic-release/release-notes-generator#154
However, since they don't have a beta
branch it was released as part of the package (not in a beta
release).
Update the peerDependencies
on the beta
branch of this plugin to match the release notes.
Lines 61 to 63 in 8349d07
"peerDependencies": {
"semantic-release": ">=15.9.0 <16.0.0 || >=16.0.0-beta <17.0.0"
},
Is it possible to run several commands (i.e. array)?
Using &&
with a long list is not so convenient.
With a package.json
release configuration like below, the exec plugin seems to override certain default steps:
{
"plugins": [,
["@semantic-release/exec", {
"verifyConditionsCmd": "./verify.sh",
"publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"
}],
]
}
This is the same config as used in the README, but without the @semantic-release/commit-analyzer
and @semantic-release/release-notes-generator
plugins. Here is a log excerpt from a build using a configuration like above:
[5:44:43 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/exec"
[5:44:43 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/exec"
[5:44:43 PM] [semantic-release] › ℹ There are no relevant changes, so no new version is released.
When I include the plugins included in the README, things work like usual. When I do not include the exec module at all, the release notes and commit analysis plugins are called by default. Why does the exec module override them?
I'm trying to use exec to bake the version number into my application before build.
package.json
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/release.tar.gz"
}
]
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/<version>/${steps.semantic.outputs.new_release_version}/' src/index.ts && npm run build && cd build && tar -czf release.tar.gz **/* ../package.json ../package-lock.json"
}
]
]
}
I've defined these plugins in package.json
to do so, however when trying to execute a build using this procedure the build crashes saying steps
is not defined in exec.
[4:16:14 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/exec"
[4:16:14 PM] [semantic-release] › ✖ Failed step "prepare" of plugin "@semantic-release/exec"
[4:16:14 PM] [semantic-release] › ✖ An error occurred while running semantic-release: ReferenceError: steps is not defined
at eval (lodash.templateSources[0]:9:10)
at module.exports (/home/runner/work/Shubot/Shubot/node_modules/@semantic-release/exec/lib/exec.js:7:39)
at prepare (/home/runner/work/Shubot/Shubot/node_modules/@semantic-release/exec/index.js:54:11)
at validator (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
at /home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
at next (/home/runner/work/_actions/cycjimmy/semantic-release-action/v2/node_modules/p-reduce/index.js:17:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
pluginName: '@semantic-release/exec'
}
##[error]ReferenceError: steps is not defined
Trying to access one of the variables shown in the example:
"publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"
in this project like so:
"success": [
"@semantic-release/github",
[
"@semantic-release/exec",
{
"successCmd": "npm start -- --branch ${options.branch}"
}
]
],
when this step run, I see this in the travis run:
[11:16:33 PM] [semantic-release] › ℹ Start step "success" of plugin "@semantic-release/exec"
[11:16:33 PM] [semantic-release] [@semantic-release/exec] › ℹ Call script npm start -- --branch
> @kibibit/[email protected] start /home/travis/build/Kibibit/announce-it
> node ./bin/announce-it-cli.js "--branch"
which looks like the template variable wasn't injected there. I tried looking for a test in the exec.test.js
file to look if this is tested (and see if the variable name is wrong in the docs) but couldn't find anything.
Is there a variable I can inject with the branch name? options.branch
?
Thanks!
semantic-release-errorlog.log
I'm trying to create a workflow where I should be able to notify on success and failure of publishCmd, but failCmd doesn't get invoked at all when publishCmd returns non-zero error code. Instead the semantic-release crashes with error stack trace.
{
"ci": false,
"branches": [
"test",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "docs/CHANGELOG.md"
}
],
[
"@semantic-release/exec",
{
"failCmd": "./fail.py",
"successCmd": "./success.py",
"publishCmd": "./deploy.sh \"${nextRelease.version}\"",
"verifyConditionsCmd": "./verify.py"
}
],
[
"@semantic-release/git",
{
"assets": [
"docs/CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
It would be nice if instead of:
{
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/<version>/${nextRelease.version}/' package.json && npm run build && tar -czf my.tar.gz * && zip my.zip *"
}
}
You could specify an array of commands instead:
{
"@semantic-release/exec",
{
"prepareCmd": [
"sed -i 's/<version>/${nextRelease.version}/' package.json",
"npm run build",
"tar -czf my.tar.gz *",
"zip my.zip *"
]
}
}
Can we pass the previous step output as an argument to the script?
get-data:
runs-on: ubuntu-latest
outputs:
change-log: ${{ steps.update-specs.outputs.change-log }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Test
run: |
echo "::set-output name=change-log::testChange"
release:
runs-on: ubuntu-latest
needs: [get-data]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- run: |
git pull
npm install
- name: semanticRelease
run: |
npm i --save-dev @semantic-release/exec
npx semantic-release -t \${version}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package.json:
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGES.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": [
"CHANGES.md",
"package.json"
],
"message": "chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/exec",
{
"successCmd": "node .github/scripts/build.js ${nextRelease.version}" // Here Can we pass the change-log variable of get-data step?
}
]
]
Hello,
What's about semantic-release 15 support? What is not working?
Line 67 in 7ac578c
Thanks,
Noé
Would help gain complete understanding of how to put this to good use.
I would like to run a command that uses the newly updated package.json version and write it into a file that is added to git to be included as part of the release commit, is it possible to do so with exec?
My use case is that I'm building a hybrid app where semantic-release would bump the package.json version, I would then like to use the new package.json version to update the native android & ios versions based on that and push that to git as part of the release commit, is that something I can accomplish with exec, or do I manually need to trigger my script after release as a separate commit?
I tried setting that as part of the publishCmd but it didn't work, it seems to be run either too early before the new package.json version is set or too late after the commit has already been made
PS: npmPublish is set to false
If some error occurs for example at verifyConditions of @semantic-release/gitlab plugin, fail action executes and I receive a notification. But if script defined in prepareCmd fails, it doesn`t work.
I am running webpack with the exec plugin as a prepare step, to avoid running it when no release needs to be done. It can take multiple minutes.
Currently, during the whole time, no output is shown. Once the command finishes, all output is shown at once.
This makes it hard to watch the build progress or determine if it hanged (and CI might kill the build if it does not output anything for longer than 10min).
Expected: Output should be streamed.
Passing stdio: 'inherit'
to execa (or stdio: [stdout, stderr]
) should do the trick.
Hello,
In the prepare stage, prepare exec step is adding the git tag and pushing it. Let user set if s/he wants to tag or not. At least give user an opportunity to not the push these git tags. This is useful on the way to publishing from feature branches
semantic-release/exec version 6.0.3 is locked into:
"peerDependencies": {
"semantic-release": ">=18.0.0"
}
This version has a known vulnerability -> https://github.ibm.com/advisories/GHSA-x2pg-mjhr-2m5x
Proposal:
Upgrade semantic-release to version 19.0.3 or later and create a new release
This would reduce boilerplate of cd
at the beginning of cmd
, if the package is in a subfolder.
Is this all available shell variables?
Part of README:
${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}
If not, is there a summary of them?
I'm looking for variable that holds changelog.
Hi,
I'm having issue with following your example:
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/exec", {
"verifyConditionsCmd": "./verify.sh",
"publishCmd": "./publish.sh ${nextRelease.version} ${options.branch} ${commits.length} ${Date.now()}"
}],
]
}
my verify.sh
echo 'verifying'
When i execute it, i get the following:
Does the verify.sh need to be defined a certain way? Its also located in the same level as where the .releaserc is set?
Thanks,
Derek
My "publishCmd" script needs environment variables to be set to run properly.
How could I pass them to the script?
I've tried the code below but with no success:
"@semantic-release/exec",
{
"publishCmd": "node ./scripts/publish.js ${env.CI_ENVIRONMENT_VARIABLE}"
}
When my publish command has a failure, exec runs it multiple times.
Package in config:
["@semantic-release/exec", {
publishCmd: "npm run deploy"
}],
In my logs I can see that after a failure, the command is simply run again, and again.. for several tries.
Here's a snippet that shows where it fails but starts another run:
'v1.28.0: digest: sha256:73d00269eafd4d9c96fc01bc8e93b1eef57e115d6a966a21a214655b95e80af2 size: 4091\n' +
' • Rolling out on Kubernetes',
stderr: 'WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n' +
'Configure a credential helper to remove this warning. See\n' +
'https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n' +
'\n' +
'error: You must be logged in to the server (Unauthorized)',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
pluginName: '@semantic-release/exec'
}
Error: Command failed with exit code 1: npm run deploy
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
error: You must be logged in to the server (Unauthorized)
> @---/[email protected] deploy
> ./scripts/deploy-detect.sh
> @---/[email protected] deploy:production
> env-cmd -e production ./scripts/deploy.sh
Building and deploying docker image
Lines 60 to 62 in f9ea421
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/semantic-release
npm ERR! dev semantic-release@"18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer semantic-release@">=16.0.0 <18.0.0" from @semantic-release/[email protected]
npm ERR! node_modules/@semantic-release/exec
npm ERR! dev @semantic-release/exec@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
should be resolved with #185
This version has 3 moderate severity vulnerabilities.
I have like 5 different @semantic-release/exec plugins and I was wondering if it's possible to rename the plugin for logging purposes?
[Semantic release]: Call script NODE_ENV=production yarn build
$ node scripts/build.js
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
56.64 KB build/static/js/main.c965c6ba.js
788 B build/static/css/main.1746b4f4.css
The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:
"homepage" : "http://myname.github.io/myapp",
The build folder is ready to be deployed.
You may serve it with a static server:
yarn global add serve
serve -s build
Find out more about deployment here:
http://bit.ly/2vY88Kr
[Semantic release]: An error occurred while running semantic-release: { JSONError: Unexpected token $ in JSON at position 0 while parsing near '$ node scripts/build...'
at module.exports (/home/circleci/repo/node_modules/@semantic-release/exec/node_modules/parse-json/index.js:26:19)
at publish (/home/circleci/repo/node_modules/@semantic-release/exec/index.js:55:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7) name: 'JSONError' }
error Command failed with exit code 1.
I'm experiencing an issue where basic commands are not found when executing from within my shell script. Rsync and ZIP namely
#!/bin/sh
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit
fi
...
Environment variables
...
echo "Syncing files..."
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${SLUG}.zip" "$SLUG/"
module.exports = {
tagFormat: "${version}",
branch: "master",
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/npm", {
npmPublish: false
}],
["@semantic-release/exec", {
"publishCmd": "chmod +x ./bin/build-zip.sh && ./bin/build-zip.sh ${nextRelease.version}"
}],
["@semantic-release/github", {
"assets": [
{"path": "build/build.zip", "label": "Bundle"}
]
}]
]
};
Is this perhaps a directory or permissions issue?
Hi guys,
I am using the exec plugin to change the git url and few other things in the generated changelog.
Unfortunately the updated changelog is not added and commitet to git.
My script looks like this
const fs = require("fs").promises;
const path = require("path");
const showdown = require("showdown");
const converter = new showdown.Converter();
const pathToChangelog = path.resolve(__dirname, "../CHANGELOG.md");
const pathToChangelogHtml = path.resolve(__dirname, "../CHANGELOG.html");
const regex = /https\/\/:my-wrong-url/gi;
const humanVisitableBitbucketUrl =
"my-new-bitbucket-url";
const getChangelog = async path => await fs.readFile(path, { encoding: "utf-8" });
const replaceUrl = (changelog, regex, url) => changelog.replace(regex, url);
const writeChangelog = async (changelog, path) => await fs.writeFile(path, changelog);
const convertMarkdownToHtml = changelog => converter.makeHtml(changelog);
const writeHtml = async (html, path) => await fs.writeFile(path, html);
(async () => {
const changelog = await getChangelog(pathToChangelog);
const modifiedChangelog = replaceUrl(changelog, regex, humanVisitableBitbucketUrl);
await writeChangelog(modifiedChangelog, pathToChangelog);
const html = convertMarkdownToHtml(modifiedChangelog);
await writeHtml(html, pathToChangelogHtml);
})();
The exec config in my package.json looks like this:
"release": {
"branch": "develop",
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/git",
[
"@semantic-release/exec",
{
"prepareCmd": "node tools/modify-changelog.js"
}
]
],
"preset": "angular"
}
What am I doing wrong? Am I using the wrong hook? Do I need to add and commit the files myself? Any help is very much appreciated :)
Branch | Build failing 🚨 |
---|---|
Dependency | sinon |
Current Version | 4.1.5 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 10 commits.
68c37ed
Update docs/changelog.md and set new release id in docs/_config.yml
cd8ae51
Add release documentation for v4.1.6
29e80be
4.1.6
a5c59a5
Update History.md and AUTHORS for new release
0ae60b6
Merge pull request #1653 from mroderick/upgrade-dependencies
dcd4191
Upgrade browserify to latest
a316f02
Upgrade markdownlint-cli to latest
78ebdb3
Upgrade lint-staged to latest
fcf967b
Upgrade dependency supports-color
7c3cb4f
Enable StaleBot with default configuration (#1649)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.