Skip to content

Commit

Permalink
fix: issue with mainnet update available
Browse files Browse the repository at this point in the history
chore: tidy up electron build config

chore(release): 4.0.0-beta.12 [skip ci]

* issue with mainnet update available ([94fa75a](94fa75a))
  • Loading branch information
kyranjamie committed Jan 14, 2021
1 parent 3375801 commit 83a0537
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 29 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Audit

on: [push]
on:
push:
branches:
- '**'

jobs:
audit:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/debug-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
uses: actions/checkout@v1

- uses: actions/cache@v2
id: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand Down Expand Up @@ -81,13 +82,15 @@ jobs:
# using separate run to install those packages separately
- name: Install packages
uses: nick-invision/retry@v2
if: steps.cache-node-modules.outputs.cache-hit != 'true'
with:
timeout_seconds: 600
max_attempts: 3
retry_on: error
command: yarn --frozen-lockfile --ignore-scripts

- name: Install `app/` packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: cd app && yarn --frozen-lockfile --ignore-scripts

- name: Extract version
Expand All @@ -111,7 +114,7 @@ jobs:
- run: ls -R release

- uses: actions/upload-artifact@v2
name: ${{ matrix.os }} upload
name: ${{ matrix.NPM_COMMAND }} ${{ matrix.stx_network }} upload
with:
name: stacks-wallet-${{ matrix.stx_network }}-${{ matrix.NPM_COMMAND }}
path: ${{ matrix.UPLOAD_ASSETS }}
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/exact-versions.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Exact versions

on: [push]

on:
push:
branches:
- '**'
jobs:
check-versions:
runs-on: ubuntu-latest
Expand All @@ -10,14 +12,7 @@ jobs:

- uses: actions/setup-node@v1

- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --ignore-scripts --ignore-optional
- run: yarn add @actions/core -E

- name: Check exact versions
uses: ./.github/actions/check-version-lock
uses: .github/actions/check-version-lock
2 changes: 1 addition & 1 deletion .github/workflows/publish-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ jobs:
uses: Ilshidur/action-discord@master
with:
args: |
New release: [Stacks Wallet `v${{ needs.release.outputs.new_release_version }}`](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.build.outputs.version }}))
New release: [Stacks Wallet `v${{ needs.build.outputs.version }}`](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.build.outputs.version }}))
6 changes: 4 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Typecheck

on: [push]

on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-20.04
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [4.0.0-beta.12](https://github.com/blockstack/stacks-wallet/compare/v4.0.0-beta.11...v4.0.0-beta.12) (2021-01-09)


### Bug Fixes

* issue with mainnet update available ([94fa75a](https://github.com/blockstack/stacks-wallet/commit/94fa75a708bec0c1356917f61a3778871ffd49fa))

# [4.0.0-beta.11](https://github.com/blockstack/stacks-wallet/compare/v4.0.0-beta.10...v4.0.0-beta.11) (2021-01-09)


Expand Down
8 changes: 7 additions & 1 deletion app/hooks/use-check-for-updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { WALLET_VERSION, NETWORK } from '@constants/index';
import { useInterval } from './use-interval';

const UPDATE_CHECK_INTERVAL = 120_000;
const NEW_WALLET_STARTING_MAJOR_VERSION = 4;

export function useCheckForUpdates() {
const [newerReleaseAvailable, setNewerReleaseAvailable] = useState(false);
Expand All @@ -20,7 +21,12 @@ export function useCheckForUpdates() {
// Prevent runtime errors incase an invalid tag makes it into upstream
.filter(release => compareVersions.validate(release.tag_name))
.filter(release => (NETWORK === 'mainnet' ? !release.prerelease : release.prerelease))
.filter(release => !release.tag_name.startsWith('v3'));
.filter(release => release.tag_name.startsWith('v'))
.filter(
release =>
typeof release.tag_name[1] === 'number' &&
release.tag_name[1] >= NEW_WALLET_STARTING_MAJOR_VERSION
);

if (latestReleases[0]) setLatestRelease(latestReleases[0]);

Expand Down
14 changes: 7 additions & 7 deletions electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const baseConfig = {
],
},
win: {
target: ['nsis', 'msi'],
target: ['msi'],
},
mac: {
hardenedRuntime: true,
Expand All @@ -49,12 +49,12 @@ const baseConfig = {
buildResources: 'resources',
output: 'release',
},
publish: {
provider: 'github',
owner: 'blockstack',
repo: 'blockstack',
private: false,
},
// publish: {
// provider: 'github',
// owner: 'blockstack',
// repo: 'blockstack',
// private: false,
// },
// protocols: {
// name: 'stacks-wallet',
// schemes: ['stacks-wallet'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stacks-wallet",
"version": "4.0.0-beta.11",
"version": "4.0.0-beta.12",
"description": "Stacks Wallet 2.0 — Stacking",
"prettier": "@stacks/prettier-config",
"homepage": "https://www.blockstack.org/testnet-wallet",
Expand Down
8 changes: 4 additions & 4 deletions scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const { notarize } = require('electron-notarize');
const appId = require('../electron-builder.js').appId
const { appId } = require('../electron-builder.js');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: `${appId}`,
appPath: `${appOutDir}/${appName}.app`,
appBundleId: `${String(appId)}`,
appPath: `${String(appOutDir)}/${String(appName)}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASS,
});
Expand Down

0 comments on commit 83a0537

Please sign in to comment.