
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Release manager for npm, bower, component, PyPI, git tags, and any plugin you can write
Release manager for npm, bower, component, PyPI, git tags, and any command you want.
This was created out of frustration; there was no generic sharable release manager.
Features:
foundry resume
Install the module via: npm install foundry
By default, foundry
is not configured with any release commands. Install a release command via npm
:
npm install foundry-release-bower # bower
npm install foundry-release-component # component.io
npm install foundry-release-git # git
npm install foundry-release-npm # npm
npm install foundry-release-pypi # PyPI
Details about existing commands and their documentation can be found under the Commands heading.
For example purposes, we will create/release on a local-only git
repository.
# Create git repo
mkdir foundry-example
cd foundry-example
git init
echo "Hello World" > README.md
git add README.md
git commit -m "Added documentation"
# Generate `package.json` with `foundry` config
cat > package.json <<EOF
{
"foundry": {
"releaseCommands": [
"foundry-release-git"
]
}
}
EOF
# Install corresponding `git` foundry-release command
npm install foundry-release-git
# Run our release (links repeated at bottom of example)
# Prepending `./node_modules/.bin/` to `PATH` can be avoided by using `foundry.cli`
# https://github.com/twolfson/foundry.cli
# or by using `npm-run-script`
# https://www.npmjs.org/doc/misc/npm-scripts.html#environment
PATH="$PATH:$PWD/node_modules/.bin/"
foundry release 1.0.0
# Configuring steps with FOUNDRY_VERSION: 1.0.0
# Configuring steps with FOUNDRY_MESSAGE: Release 1.0.0
# Running step: foundry-release-git update-files "$FOUNDRY_VERSION" "$FOUNDRY_MESSAGE"
# Running step: foundry-release-git commit "$FOUNDRY_VERSION" "$FOUNDRY_MESSAGE"
# [master ec7a32d] Release 1.0.0
# Running step: foundry-release-git register "$FOUNDRY_VERSION" "$FOUNDRY_MESSAGE"
# Running step: foundry-release-git publish "$FOUNDRY_VERSION" "$FOUNDRY_MESSAGE"
# Pushes to remote server
# See the release commit and tag
git log --decorate --oneline
# c6ce921 (HEAD, tag: 1.0.0, master) Release 1.0.0
# f0c25b3 Added documentation
Links to alternatives to extending PATH
:
foundry.cli
, global CLI bindings for foundry
npm-run-script
, run scripts from within npm's
context
When a release occurs, the following steps are processed:
package.json
, add to CHANGELOG.md
)git commit && git tag
)1.0.0
), then register it to its repository (e.g. python setup.py register
)
registerVersion
configurationnpm publish
)foundry
can be configured via a JSON .foundryrc
file or under a foundry
key in a package.json
. In both cases, we expect the JSON to be the same.
String
- Semver to identify a new package by (e.g. 0.1.0
, 1.0.0
)
release
semver matches this, we will run register
steps. Otherwise, we won't.registerVersion
is 1.0.0
0.x.y
that introduce breaking changesArray
- Collection of commands to use when releasing
String|Object
- Information about command to run when releasing
{type: releaseCommand, command: {{string}}}
type
property that changes their behavior
String
- Classification of command
releaseCommand
or customCommand
releaseCommand is a CLI command that lines up with foundry-release-spec
String
- Classification of commandString
- Name of command to use
release
, we will each of the release steps (e.g. {{command}} update-files FOUNDRY_VERSION FOUNDRY_MESSAGE
)foundry-release-git update-files 1.0.0 "Release 1.0.0"
{
"type": "releaseCommand",
"command": "foundry-release-git"
}
customCommand is a command with a custom setup
String
- Classification of commandString
- Script to run when updating files
sh
or cmd
depending on our OSFOUNDRY_VERSION
and FOUNDRY_MESSAGE
via environment variablesecho "$FOUNDRY_VERSION: $FOUNDRY_MESSAGE" >> CHANGELOG.md
echo "1.0.0: Release 1.0.0" >> CHANGELOG.md
via sh
npm run build
to compile pre-release assetsString
- Script to run when committing changes to files
updateFiles
with sh/cmd
and environment variablesString
- Script to run when registering a package
updateFiles
with sh/cmd
and environment variablesString
- Script to run when publishing a package
updateFiles
with sh/cmd
and environment variables{
"type": "customCommand",
"updateFiles": "echo \"$FOUNDRY_VERSION\" > VERSION.txt"
}
Example config with all variations:
// This is for a `.foundryrc`
// In a `package.json`, we would be nested inside of the `foundry` key
{
"releaseCommands": [
"foundry-release-git", // Shorthand
{
"type": "releaseCommand",
"command": "foundry-release-npm"
},
{
"type": "customCommand",
"updateFiles": "echo \"$FOUNDRY_VERSION\" > VERSION.txt"
}
]
}
foundry
provides a command line interface for releasing.
$ foundry --help
Usage: foundry [options] [command]
Commands:
release [options] <version> Update package metadata and publish to registries
resume [options] Resume an incomplete release
commands List commands used by current package
completion Get potential completions for a command. Looks for `COMP_CWORD`, `COMP_LINE`, `COMP_POINT`.
Options:
-h, --help output usage information
-V, --version output the version number
Example releases are:
foundry release 1.0.0
foundry release 1.1.0
foundry release 2.0.0
Commands that automatically increment semver are planned (e.g.
foundry release major
,foundry release minor
). See https://github.com/twolfson/foundry/issues/16 for more information.
foundry
release commands contain the foundry-release
keyword and adhered to the foundry
release command specification:
https://github.com/twolfson/foundry-release-spec
Existing commands are:
version
in bower.json
version
in component.json
git tag
and git commit
upon releaseversion
in package.json
and runs npm publish
upon releaseversion
in setup.py
and registers/zips/gzips package upon releaseIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via npm run lint
and test via npm test
.
Support this project and others by twolfson via donations.
http://twolfson.com/support-me
As of Dec 07 2013, Todd Wolfson has released this repository and its contents to the public domain.
It has been released under the UNLICENSE.
FAQs
Release manager for npm, bower, component, PyPI, git tags, and any plugin you can write
The npm package foundry receives a total of 138 weekly downloads. As such, foundry popularity was classified as not popular.
We found that foundry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.