Skip to content

Commit

Permalink
Revert things
Browse files Browse the repository at this point in the history
This reverts commit df90c98.

This reverts commit f11c8ae.

This reverts commit 39d0a45.
  • Loading branch information
dacbd committed Oct 8, 2022
1 parent df90c98 commit 34c8301
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion bin/cml/asset/publish.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { exec } = require('../../../src/utils');
describe('CML e2e', () => {
test('cml publish assets/logo.png --md', async () => {
const output = await exec(`node ./bin/cml.js publish assets/logo.png --md`);
console.log(output);

expect(output.startsWith('![](')).toBe(true);
});

Expand Down
9 changes: 0 additions & 9 deletions src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,16 @@ const inferToken = () => {

const inferDriver = (opts = {}) => {
const { repo } = opts;
console.log('!!!!! DEBUG !!!!!');
console.log(repo);
if (repo) {
const url = new URL(repo);
console.log(url);
if (url.hostname === 'github.com') return GITHUB;
if (url.hostname === 'gitlab.com') return GITLAB;
if (/bitbucket\.(com|org)/.test(url.hostname)) return BB;
}

console.log('!!!!! DEBUG !!!!!');
if (GITHUB_REPOSITORY) return GITHUB;
if (CI_PROJECT_URL) return GITLAB;
if (BITBUCKET_REPO_UUID) return BB;

console.log('!!!!! DEBUG !!!!!');
};

const fixGitSafeDirectory = () => {
Expand Down Expand Up @@ -133,9 +127,6 @@ class CML {
);
this.token = token || inferToken();
this.driver = driver || inferDriver({ repo: this.repo });
console.log('!!! VALUE !!!');
console.log(this.driver);
console.log('!!! VALUE !!!');
}

async revParse({ ref = 'HEAD' } = {}) {
Expand Down

2 comments on commit 34c8301

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.