Skip to content

Commit

Permalink
bugfix(): remove some internals (#253)
Browse files Browse the repository at this point in the history
* update dist folder

* change env

* change github to piper

* adjust error message

---------

Co-authored-by: Valentin Uchkunev <[email protected]>
  • Loading branch information
bitmaskit and Valentin Uchkunev authored Feb 18, 2025
1 parent 2324e6d commit adcda7f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
13 changes: 8 additions & 5 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/build.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Format for inner source development versions (all parts required): 'devel:GH_OWNER:REPOSITORY:COMMITISH'
import { info, setFailed } from '@actions/core'
import { error, info, setFailed } from '@actions/core'
import { dirname, join } from 'path'
import fs from 'fs'
import { chdir, cwd } from 'process'
import { exec } from '@actions/exec'
import { extractZip } from '@actions/tool-cache'

export const GITHUB_WDF_SAP_SERVER_URL = 'https://github.wdf.sap.corp'

export async function buildPiperInnerSource (version: string, wdfGithubEnterpriseToken: string = ''): Promise<string> {
const { owner, repository, commitISH } = parseDevVersion(version)
const versionName = getVersionName(commitISH)
Expand All @@ -23,7 +21,11 @@ export async function buildPiperInnerSource (version: string, wdfGithubEnterpris
}

info(`Building Inner Source Piper from ${version}`)
const url = `${GITHUB_WDF_SAP_SERVER_URL}/${owner}/${repository}/archive/${commitISH}.zip`
const innerServerUrl = process.env.PIPER_ENTERPRISE_SERVER_URL ?? ''
if (innerServerUrl === '') {
error('PIPER_ENTERPRISE_SERVER_URL repository secret is not set. Add it in Settings of the repository')
}
const url = `${innerServerUrl}/${owner}/${repository}/archive/${commitISH}.zip`
info(`URL: ${url}`)

info(`Downloading Inner Source Piper from ${url} and saving to ${path}/source-code.zip`)
Expand Down

0 comments on commit adcda7f

Please sign in to comment.