Skip to content

Commit

Permalink
Merge pull request #5 from JupiterOne/build-on-commit
Browse files Browse the repository at this point in the history
[No Ticket] - build on commit
  • Loading branch information
electricgull authored Aug 1, 2022
2 parents b7e7710 + 649927d commit 0804849
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 63 deletions.
56 changes: 28 additions & 28 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 117:
/***/ 241:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand All @@ -28,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issue = exports.issueCommand = void 0;
const os = __importStar(__nccwpck_require__(37));
const utils_1 = __nccwpck_require__(46);
const utils_1 = __nccwpck_require__(278);
/**
* Commands
*
Expand Down Expand Up @@ -100,7 +100,7 @@ function escapeProperty(s) {

/***/ }),

/***/ 559:
/***/ 186:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand Down Expand Up @@ -135,12 +135,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
const command_1 = __nccwpck_require__(117);
const file_command_1 = __nccwpck_require__(28);
const utils_1 = __nccwpck_require__(46);
const command_1 = __nccwpck_require__(241);
const file_command_1 = __nccwpck_require__(717);
const utils_1 = __nccwpck_require__(278);
const os = __importStar(__nccwpck_require__(37));
const path = __importStar(__nccwpck_require__(17));
const oidc_utils_1 = __nccwpck_require__(853);
const oidc_utils_1 = __nccwpck_require__(41);
/**
* The code to exit an action
*/
Expand Down Expand Up @@ -418,18 +418,18 @@ exports.getIDToken = getIDToken;
/**
* Summary exports
*/
var summary_1 = __nccwpck_require__(368);
var summary_1 = __nccwpck_require__(327);
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
/**
* @deprecated use core.summary
*/
var summary_2 = __nccwpck_require__(368);
var summary_2 = __nccwpck_require__(327);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
//# sourceMappingURL=core.js.map

/***/ }),

/***/ 28:
/***/ 717:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand Down Expand Up @@ -460,7 +460,7 @@ exports.issueCommand = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__nccwpck_require__(147));
const os = __importStar(__nccwpck_require__(37));
const utils_1 = __nccwpck_require__(46);
const utils_1 = __nccwpck_require__(278);
function issueCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
Expand All @@ -478,7 +478,7 @@ exports.issueCommand = issueCommand;

/***/ }),

/***/ 853:
/***/ 41:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand All @@ -494,9 +494,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(506);
const auth_1 = __nccwpck_require__(754);
const core_1 = __nccwpck_require__(559);
const http_client_1 = __nccwpck_require__(255);
const auth_1 = __nccwpck_require__(526);
const core_1 = __nccwpck_require__(186);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
Expand Down Expand Up @@ -562,7 +562,7 @@ exports.OidcClient = OidcClient;

/***/ }),

/***/ 368:
/***/ 327:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand Down Expand Up @@ -852,7 +852,7 @@ exports.summary = _summary;

/***/ }),

/***/ 46:
/***/ 278:
/***/ ((__unused_webpack_module, exports) => {

"use strict";
Expand Down Expand Up @@ -899,7 +899,7 @@ exports.toCommandProperties = toCommandProperties;

/***/ }),

/***/ 754:
/***/ 526:
/***/ (function(__unused_webpack_module, exports) {

"use strict";
Expand Down Expand Up @@ -987,7 +987,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand

/***/ }),

/***/ 506:
/***/ 255:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand Down Expand Up @@ -1025,8 +1025,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
const http = __importStar(__nccwpck_require__(685));
const https = __importStar(__nccwpck_require__(687));
const pm = __importStar(__nccwpck_require__(617));
const tunnel = __importStar(__nccwpck_require__(683));
const pm = __importStar(__nccwpck_require__(835));
const tunnel = __importStar(__nccwpck_require__(294));
var HttpCodes;
(function (HttpCodes) {
HttpCodes[HttpCodes["OK"] = 200] = "OK";
Expand Down Expand Up @@ -1599,7 +1599,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa

/***/ }),

/***/ 617:
/***/ 835:
/***/ ((__unused_webpack_module, exports) => {

"use strict";
Expand Down Expand Up @@ -1667,15 +1667,15 @@ exports.checkBypass = checkBypass;

/***/ }),

/***/ 683:
/***/ 294:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

module.exports = __nccwpck_require__(578);
module.exports = __nccwpck_require__(219);


/***/ }),

/***/ 578:
/***/ 219:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {

"use strict";
Expand Down Expand Up @@ -2084,7 +2084,7 @@ module.exports = require("util");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
const core = __nccwpck_require__(559);
const core = __nccwpck_require__(186);
const { stringify } = __nccwpck_require__(477);
const npm_auth_token = core.getInput('npm_auth_token', { required: true });
const gh_token = core.getInput('gh_token', { required: true });
Expand All @@ -2101,6 +2101,8 @@ const main = async () => {
console.log('skipping due to [skip ci] message')
return;
}
execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`,
{stdio: 'inherit'})
execSync('yarn global add auto',
{stdio: 'inherit'})
execSync('yarn install --frozen-lockfile',
Expand All @@ -2117,8 +2119,6 @@ const main = async () => {
{stdio: 'inherit'})
execSync('git fetch --tags',
{stdio: 'inherit'})
execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`,
{stdio: 'inherit'})
execSync(`NPM_TOKEN=${npm_auth_token} GH_TOKEN=${gh_token} auto shipit --email [email protected] --name j1-internal-automation`,
{stdio: 'inherit'})
}
Expand Down
2 changes: 2 additions & 0 deletions git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn build
git add dist/index.js
46 changes: 13 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "git config core.hooksPath ./git-hooks",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "ncc build src/index.js"
"build": "yarn ncc build src/index.js"
},
"repository": {
"type": "git",
Expand All @@ -19,6 +20,7 @@
},
"homepage": "https://github.com/JupiterOne/action-npm-build-release#readme",
"dependencies": {
"@actions/core": "^1.8.2"
"@actions/core": "^1.8.2",
"@vercel/ncc": "^0.34.0"
}
}

0 comments on commit 0804849

Please sign in to comment.