From 5700bab332e34ac2e8a1b57e6356618e2d3607eb Mon Sep 17 00:00:00 2001 From: Ruben Nic Date: Wed, 24 Jul 2024 10:56:54 -0400 Subject: [PATCH] Give correct SHA --- scripts/upload-source-maps.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/upload-source-maps.ts b/scripts/upload-source-maps.ts index de3077f74f..b06bf1ce4c 100644 --- a/scripts/upload-source-maps.ts +++ b/scripts/upload-source-maps.ts @@ -2,8 +2,6 @@ * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ - -// import { unlinkSync } from 'fs' import { execSync } from 'child_process' const main = () => { @@ -11,7 +9,7 @@ const main = () => { return } - const LATEST_SHA = execSync('git rev-parse HEAD').toString().trim() + const LATEST_SHA = process.env.VERCEL_GIT_COMMIT_SHA const PATH_PREFIX = 'https://developer.hashicorp.com/_next/static/' const SERVICE = 'developer.hashicorp.com' @@ -30,11 +28,6 @@ const main = () => { }) console.log('Source maps uploaded successfully') - - // Delete the source map file - // unlinkSync('.next/static/your-source-map-file.js.map') - - console.log('Source map deleted successfully') } catch (error) { console.error(error)