Skip to content

Commit

Permalink
feat: use metadata prop Bundle-SymbolicName as artifact id. (#75)
Browse files Browse the repository at this point in the history
* feat: use metadata prop Bundle-SymbolicName as artifact id and Origin-Bundle-SymbolicName as fallback
* ci: update to latest Sonar scan task und install Java 17 required for the scan to run
  • Loading branch information
marcelschork authored Apr 15, 2024
1 parent 3687a9d commit 8f41898
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: SonarSource/[email protected]
- uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/client/ManifestReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default class ManifestReader {
getArtifactMetadata(): Artifact {
return {
Id:
(this.manifestEntries.get('Origin-Bundle-SymbolicName') as string) ||
(this.manifestEntries.get('Bundle-SymbolicName') as string).split(';')[0],
(this.manifestEntries.get('Bundle-SymbolicName') as string).split(';')[0] ||
(this.manifestEntries.get('Origin-Bundle-SymbolicName') as string),
Version: this.manifestEntries.get('Bundle-Version') as string,
Name: this.manifestEntries.get('Bundle-Name') as string,
Type: this.manifestEntries.get('SAP-BundleType') as ArtifactType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-Description:
Bundle-SymbolicName: com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffbo
ardUserRecordWithExpabcd; singleton:=true
ardUserRecordWithExpabcd.EBZ; singleton:=true
Origin-Bundle-SymbolicName: com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingG
etOffboardUserRecordWithExpabcd
Bundle-ManifestVersion: 2
Expand Down
2 changes: 1 addition & 1 deletion src/test/integration/IntegrationFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Integration flow', () => {
});

it('fetch an integration flow ', async () => {
const iFlowId = sciRestClient.getArtifactMetadata(path.join(artiFactDirectory, 'TestPackage', iFlowFolder)).Id;
const iFlowId = sciRestClient.getArtifactMetadata(path.join(artiFactDirectory, 'Testpackage', iFlowFolder)).Id;
const readStream = (await sciRestClient.getArtifact(iFlowId, '1.0.0', 'IntegrationFlow')) as ReadStream;

const writer = fs.createWriteStream(path.join(artiFactDirectory, 'test.zip'));
Expand Down

0 comments on commit 8f41898

Please sign in to comment.