Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch to dist.ipfs.tech #55

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 `[email protected]` 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