fs-repo-migrations-dep

1.4.0 • Public • Published

fs-repo-migrations-dep

Download fs-repo-migrations to your node_modules.

Travis CI Dependency Status

Installation

npm install fs-repo-migrations-dep --save

See IPFS getting-started. If anything goes wrong, try using: http://ipfs.io/docs/install.

Usage

This module downloads fs-repo-migrations binaries from https://dist.ipfs.io into your project.

By default it will download the fs-repo-migrations version that matches the npm version of this module. So depending on fs-repo-migrations-dep@0.4.19 will install fs-repo-migrations v0.4.19 for your current system architecture, in to your project at node_modules/fs-repo-migrations-dep/fs-repo-migrations/ipfs.

Overriding the fs-repo-migrations version

You can override the version of fs-repo-migrations that gets downloaded by adding by adding a fs-repo-migrations.version field to your package.json

"fs-repo-migrations": {
  "version": "v1.4.0"
},

Using local IPFS daemon as the package download url

The url to download the binaries from can be specified by adding a field fs-repo-migrations.distUrl field to your package.json, eg:

"fs-repo-migrations": {
  "version": "v1.4.0",
  "distUrl": "http://localhost:8080/ipfs/QmSoNtqW22htkg9mtHWNBvZLUEmqfq8su7957meS1iQfeL"
},

Where QmSoNtqW22htkg9mtHWNBvZLUEmqfq8su7957meS1iQfeL is the root of the distributions web site.

Or when run with node src/bin.js, the dist url can be passed via an environment variable GO_IPFS_DIST_URL, eg:

GO_IPFS_DIST_URL=http://localhost:8080/ipfs/QmSoNtqW22htkg9mtHWNBvZLUEmqfq8su7957meS1iQfeL node binsrc/bin.js

Arguments

When used via node src/bin.js, you can specify the target platform, version and architecture via environment variables: TARGET_OS, TARGET_VERSION and TARGET_ARCH.

We fetch the versions dynamically from https://dist.ipfs.io/fs-repo-migrations/versions and the OSes and architectures from https://dist.ipfs.io/fs-repo-migrations/${VERSION}/dist.json.

Or via command line arguments in the order of:

node src/bin.js <version> <platform> <architecture> <install directory>
node src/bin.js v1.4.0 linux amd64 ./fs-repo-migrations

Development

Note: The binary gets put in the fs-repo-migrations folder inside the module folder.

Deployment

Publishing is handled by GitHub Actions. The workflow is set to run every hour. It checks dist.ipfs.io for the latest fs-repo-migrations version number, and compares with the version property in the package.json for this module. If they are different, the action will update the version of this module, publish it to npm, and push the change back to the master branch.

  • .github/main.workflow defines how frequently we check for a new fs-repo-migrations release, (hourly) and the steps to carry out.
  • action-check-for-fs-repo-migrations-release compares the module version with the latest fs-repo-migrations release as published to dist.ipfs.io. This lets us bail early if everything is up to date.
  • action-publish handles updating the module version, publishing to npm, and pushing the changes back to the repo.

If for some reason you need to run it manually, follow the instructions below.

Publish a Prerelease to npm

You have made changes and want to triple check everything is working. You can! If you publish with a numeric prerelease identifier then fs-repo-migrations-dep will strip it and install the corresponding version e.g. 0.4.19-0 installs fs-repo-migrations version 0.4.19.

To deploy a new version with a prerelease identifier run the following command:

npx aegir release --type prepatch --preid '' --dist-tag next --no-lint --no-test --no-build
# Note: change "--type prepatch" to the appropriate prerelease type.
# e.g. prepatch: 0.4.18 => 0.4.19-0, preminor: 0.4.18 => 0.5.0-0 etc.

# Increment prerelease (e.g. 0.4.19-0 -> 0.4.19-1)
npx aegir release --type prerelease --preid '' --dist-tag next --no-lint --no-test --no-build

This publishes to the "next" tag meaning that the current "latest" version of fs-repo-migrations-dep will remain the same.

Publish a Release to npm

When you're finally ready to release:

npx aegir release --type=patch --no-lint --no-test --no-build

Readme

Keywords

Package Sidebar

Install

npm i fs-repo-migrations-dep

Weekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

24.7 kB

Total Files

15

Last publish

Collaborators

  • iohzrd