Skip to content

Commit

Permalink
chore: switch to dist.ipfs.tech (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Nov 10, 2022
1 parent f0953b8 commit b3f96a5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/actions/check-for-go-ipfs-release/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
set -eu

echo '💫 Checking https://dist.ipfs.io/go-ipfs/versions for new releases...'
echo '💫 Checking https://dist.ipfs.tech/go-ipfs/versions for new releases...'

# The version in packge.json e.g. "0.4.20"
CURRENT=`node -e 'console.log(require("./package.json").version)'`
# The latest version on dist.ipfs.io e.g. "0.4.21"
LATEST=`curl --silent https://dist.ipfs.io/go-ipfs/versions | tail -n 1 | cut -c 2-`
# The latest version on dist.ipfs.tech e.g. "0.4.21"
LATEST=`curl --silent https://dist.ipfs.tech/go-ipfs/versions | tail -n 1 | cut -c 2-`

# Verify $LATEST is valid semver!
if ! npx semver $LATEST; then
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/publish/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ fi

# The version in packge.json e.g. "0.4.20"
CURRENT=`node -e 'console.log(require("./package.json").version)'`
# The latest version on dist.ipfs.io e.g. "0.4.21"
LATEST=`curl --silent https://dist.ipfs.io/go-ipfs/versions | tail -n 1 | cut -c 2-`
# The latest version on dist.ipfs.tech e.g. "0.4.21"
LATEST=`curl --silent https://dist.ipfs.tech/go-ipfs/versions | tail -n 1 | cut -c 2-`

# Verify $LATEST is valid semver!
if ! npx semver $LATEST; then
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# npm-go-ipfs

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech/)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Dependency Status](https://david-dm.org/ipfs/npm-go-ipfs.svg?style=flat-square)](https://david-dm.org/ipfs/npm-go-ipfs)

> install go-ipfs from npm
> install [Kubo](https://github.com/ipfs/kubo) (previously known as "go-ipfs") from npm
## Table of Contents

Expand All @@ -19,7 +16,7 @@

## Install

Install the latest [go-ipfs](https://github.com/ipfs/go-ipfs/) binary:
Install the latest [Kubo](https://github.com/ipfs/kubo/) (go-ipfs) binary:

```sh
# Install globally
Expand All @@ -35,7 +32,7 @@ ipfs version v0.7.0

## Usage

This module downloads `go-ipfs` binaries from https://dist.ipfs.io into your project.
This module downloads Kubo (go-ipfs) binaries from https://dist.ipfs.tech into your project.

It will download the go-ipfs version that matches the npm version of this module. So depending on `go-ipfs@0.7.0` will install `go-ipfs v0.7.0` for your current system architecture, in to your project at `node_modules/go-ipfs/go-ipfs/ipfs` and additional symlink to it at `node_modules/go-ipfs/bin/ipfs`.

Expand Down Expand Up @@ -71,7 +68,7 @@ publish a version of go-ipfs to npm

This will:

- check the version is indeed a tag in https://github.com/ipfs/go-ipfs
- check the version is indeed a tag in https://github.com/ipfs/kubo
- check the size of `bin/ipfs` is right (must be the checked in file)
- update the version numbers in `package.json` and `README.md`
- `git commit` the changes
Expand Down
2 changes: 1 addition & 1 deletion src/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function cleanArguments (version, platform, arch, installPath) {
cwd: process.env.INIT_CWD || process.cwd(),
defaults: {
version: 'v' + pkg.version.replace(/-[0-9]+/, ''),
distUrl: 'https://dist.ipfs.io'
distUrl: 'https://dist.ipfs.tech'
}
})

Expand Down
2 changes: 1 addition & 1 deletion test/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('Returns an error when version unsupported', async (t) => {
test('Returns an error when dist url is 404', async (t) => {
await clean()

process.env.GO_IPFS_DIST_URL = 'https://dist.ipfs.io/notfound'
process.env.GO_IPFS_DIST_URL = 'https://dist.ipfs.tech/notfound'

await t.rejects(download(), /404/)

Expand Down

0 comments on commit b3f96a5

Please sign in to comment.