-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add verdaccio local release (#1308)
* chore: add verdaccio local release * chore: local publish with "ci" dist tag
- Loading branch information
1 parent
8a6e304
commit 85866ff
Showing
5 changed files
with
1,004 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env node | ||
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
|
||
// Reference: https://github.com/aws/aws-encryption-sdk-javascript/pull/276 | ||
|
||
const { spawn, execSync } = require("child_process"); | ||
const pipeStdIo = { stdio: [process.stdin, process.stdout, process.stderr] }; | ||
|
||
execSync("rm -rf verdaccio/storage/@aws-sdk"); | ||
|
||
// Start verdaccio in the background | ||
const verdaccio = spawn( | ||
"npx", | ||
["verdaccio", "-c", "verdaccio/config.yaml"], | ||
pipeStdIo | ||
).on("error", e => { | ||
throw e; | ||
}); | ||
|
||
// Publish all changed packages the local verdaccio server. | ||
// Anything that has not been changed will match what is in npm | ||
const args = [ | ||
"lerna", | ||
"publish", | ||
"prerelease", | ||
"--preid", | ||
"ci", | ||
"--exact", | ||
"--registry", | ||
"http://localhost:4873/", | ||
"--yes", | ||
"--no-changelog", | ||
"--no-git-tag-version", | ||
"--no-push", | ||
"--no-git-reset", | ||
"--ignore-scripts", | ||
"--no-verify-access", | ||
"--dist-tag", | ||
"ci" | ||
]; | ||
spawn("npx", args, pipeStdIo).on("close", code => { | ||
// Rollback the changes caused by the version bumping | ||
execSync("git checkout -- clients/*/package.json"); | ||
execSync("git checkout -- packages/*/package.json"); | ||
execSync("git checkout -- protocol_tests/*/package.json"); | ||
|
||
// Kill the background verdaccio server | ||
verdaccio.kill(); | ||
if (code !== 0) throw Error(`Exit code: ${code}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# | ||
# This is the default config file. It allows all users to do anything, | ||
# so don't use it on production systems. | ||
# | ||
# Look here for more config file examples: | ||
# https://github.com/verdaccio/verdaccio/tree/master/conf | ||
# | ||
|
||
# path to a directory with all packages | ||
storage: ./storage | ||
# path to a directory with plugins to include | ||
plugins: ./plugins | ||
|
||
web: | ||
title: Verdaccio | ||
# comment out to disable gravatar support | ||
# gravatar: false | ||
# by default packages are ordercer ascendant (asc|desc) | ||
# sort_packages: asc | ||
|
||
auth: | ||
htpasswd: | ||
file: ./htpasswd | ||
# Maximum amount of users allowed to register, defaults to "+inf". | ||
# You can set this to -1 to disable registration. | ||
# max_users: 1000 | ||
|
||
# a list of other known repositories we can talk to | ||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
|
||
packages: | ||
"@aws-sdk/*": | ||
# scoped packages | ||
access: $all | ||
publish: $all | ||
unpublish: $all | ||
proxy: npmjs | ||
"@*/*": | ||
# scoped packages | ||
access: $all | ||
publish: $authenticated | ||
unpublish: $authenticated | ||
proxy: npmjs | ||
|
||
"**": | ||
# allow all users (including non-authenticated users) to read and | ||
# publish all packages | ||
# | ||
# you can specify usernames/groupnames (depending on your auth plugin) | ||
# and three keywords: "$all", "$anonymous", "$authenticated" | ||
access: $all | ||
|
||
# allow all known users to publish/publish packages | ||
# (anyone can register by default, remember?) | ||
publish: $authenticated | ||
unpublish: $authenticated | ||
|
||
# if package is not available locally, proxy requests to 'npmjs' registry | ||
proxy: npmjs | ||
|
||
# You can specify HTTP/1.1 server keep alive timeout in seconds for incomming connections. | ||
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout. | ||
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enought. | ||
server: | ||
keepAliveTimeout: 60 | ||
|
||
middlewares: | ||
audit: | ||
enabled: true | ||
|
||
# log settings | ||
logs: | ||
- { type: stdout, format: pretty, level: http } | ||
#- {type: file, path: verdaccio.log, level: info} |
Oops, something went wrong.