Skip to content

Commit

Permalink
chore: fixing circleci script
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny committed Aug 31, 2020
1 parent 7a76375 commit ec9c6bd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
15 changes: 6 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ build_metrics: &build_metrics
command: npm install --ignore-scripts
- run:
name: Boostrap dependencies
command: npx lerna bootstrap --scope @opentelemetry/rca-metrics --include-filtered-dependencies
command: npx lerna bootstrap --scope @opentelemetry/rca-metrics --include-filtered-dependencies --ignore-scripts
- save_cache:
<<: *cache_1
- run:
Expand Down Expand Up @@ -208,11 +208,8 @@ workflows:
- node10
- node12
- node12-browsers
- build-native-stats

# - build-native-stats:
# filters:
# branches:
# only: master
#

- build-native-stats:
filters:
branches:
only:
- master
1 change: 0 additions & 1 deletion packages/opentelemetry-rca-metrics/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
artifacts/*
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15650db2e6cb69f2f7f36a5bbe0896c7398e7d77
18 changes: 9 additions & 9 deletions packages/opentelemetry-rca-metrics/scripts/get_prebuilds.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const os = require('os');
const path = require('path');
const exec = require('./exec.js');

console.log('Downloading and compiling files for release.');
const MAIN_FOLDER = path.resolve(__dirname, '..');
const ARTIFACTS_FOLDER = path.resolve(MAIN_FOLDER, 'artifacts');

console.log('Downloading rca-metrics compiled files for release.');

const TOKEN = process.env.CIRCLE_TOKEN;
if (!TOKEN) {
throw new Error(
[
Expand Down Expand Up @@ -69,7 +71,6 @@ getPipeline()
.then(downloadArtifacts)
.then(validatePrebuilds)
.then(copyPrebuilds)
.then(bundle)
.catch(e => {
process.exitCode = 1;
console.error(e);
Expand Down Expand Up @@ -186,15 +187,14 @@ function validatePrebuilds() {
}

function copyPrebuilds() {
const basename = path.normalize(path.join(__dirname, '..', 'artifacts'));
const filename = 'prebuilds.tgz';

fs.copyFileSync(
path.join(os.tmpdir(), filename),
path.join(basename, filename)
path.join(ARTIFACTS_FOLDER, filename)
);
fs.copyFileSync(
path.join(os.tmpdir(), `${filename}.sha1`),
path.join(ARTIFACTS_FOLDER, `${filename}.sha1`)
);
}

function bundle() {
exec('yarn bundle');
}

0 comments on commit ec9c6bd

Please sign in to comment.