Skip to content

Commit

Permalink
Merge pull request #1 from RegestaItalia/major
Browse files Browse the repository at this point in the history
Major release (2.0.0)
  • Loading branch information
simonegaffurini authored Jun 21, 2024
2 parents 6e384d9 + f7b705f commit c253df6
Show file tree
Hide file tree
Showing 688 changed files with 18,024 additions and 3,016 deletions.
132 changes: 71 additions & 61 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,96 +5,106 @@ branding:
icon: 'upload'
color: 'yellow'
inputs:
githubToken:
description: 'Github token - Only needed when you want to fallback to repository values'
required: false
registryEndpoint:
description: 'TRM Registry Endpoint'
default: 'public'
required: false
registryAuth:
description: 'TRM Registry Auth (JSON)'
required: false
systemDest:
description: 'System ID'
description: Origin system ID
required: true
systemAsHost:
description: 'System Application Server Address'
description: Origin system application Server
required: true
systemSysNr:
description: 'System Instance Number'
systemSysnr:
description: Origin system instance number
required: true
systemSapRouter:
description: 'System SAP Router String'
required: false
systemClient:
description: 'System Logon Client'
required: true
systemLang:
description: 'System Logon Language'
description: Origin system logon client
required: true
systemUser:
description: 'System Logon User'
description: Origin system logon user
required: true
systemPassword:
description: 'System Logon Password'
description: Origin system logon password
required: true
packageName:
description: 'TRM Package name'
systemLang:
description: Origin system logon language
required: true
devclass:
description: SAP Package
required: true
target:
description: SAP Transport release target
required: true
registryEndpoint:
description: Registry endpoint
default: public
required: false
packageVersion:
description: 'TRM Package version'
registryAuth:
description: Registry authentication in JSON format
required: false
default: 'latest'
packageDescription:
description: 'TRM Package description'
packageName:
description: Package name (on registry)
required: true
packageVersion:
description: Package version (on registry)
default: latest
required: false
packageGit:
description: 'TRM Package git'
description:
description: Package short description
required: false
packageWebsite:
description: 'TRM Package website'
private:
description: Package visibility
default: false
required: false
packagePrivate:
description: 'TRM Package private'
required: true
packageLicense:
description: 'TRM Package license'
git:
description: Git repository url
required: false
packageKeywords:
description: 'TRM Package keywords (JSON)'
website:
description: Package website url
required: false
packageAuthors:
description: 'TRM Package authors (JSON)'
license:
description: Package SPDX license
required: false
packageBackwardsCompatible:
description: 'TRM Package backwards compatible'
authors:
description: Package authors separated by comma
required: false
packageSapEntries:
description: 'TRM Package SAP Entries (JSON string or path to file, merged with runtime values)'
keywords:
description: Package keywords separated by comma
required: false
packageDependencies:
description: 'TRM Package Dependencies (JSON string or path to file, merged with runtime values)'
readme:
description: Package readme or path to readme file
required: false
devclass:
description: 'Devclass'
required: true
target:
description: 'Transport Target'
required: true
releaseTimeout:
description: 'Transport release timeout (in seconds)'
description: Transport request release timeout, in seconds (increase for larger packages)
default: 180
required: false
readme:
description: 'Markdown string or path to file'
overwriteManifestValues:
description: Overwrite existing manifest values from previous release from registry
default: true
required: false
skipDependencies:
description: 'Skip automatic dependency recognition'
description: Skip seraching for TRM/SAP Entries dependencies
default: false
required: false
skipTrLang:
description: 'Skip translation trasport'
skipLang:
description: Skip translation transport generation
default: false
required: false
backwardsCompatible:
description: Indicates that the current release is backwards compatible with the previous releases
default: true
required: false
custTransports:
description: Customizing transports separated by comma to include (main transports are sufficient)
required: false
dependencies:
description: Manually added TRM dependencies in JSON format
required: false
sapEntries:
description: Manually added SAP Entries in JSON format
required: false
tmpFolder:
description: Directory for temporary files
required: false
simpleLog:
description: Don't use Github Actions annotations on important log messages
default: false
required: false
runs:
Expand Down
15 changes: 15 additions & 0 deletions dist/GithubLogger.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ILogger, TreeLog } from "trm-core";
import { ResponseMessage } from "trm-registry-types";
export declare class GithubLogger implements ILogger {
debug: boolean;
constructor(debug: boolean);
loading(text: string, debug?: boolean): void;
success(text: string, debug?: boolean): void;
error(text: string, debug?: boolean): void;
warning(text: string, debug?: boolean): void;
info(text: string, debug?: boolean): void;
log(text: string, debug?: boolean): void;
table(header: any, data: any, debug?: boolean): void;
registryResponse(response: ResponseMessage, debug?: boolean): void;
tree(data: TreeLog, debug?: boolean): void;
}
107 changes: 107 additions & 0 deletions dist/GithubLogger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubLogger = void 0;
const core = __importStar(require("@actions/core"));
const trm_registry_types_1 = require("trm-registry-types");
class GithubLogger {
constructor(debug) { }
loading(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
console.log(text);
}
success(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
console.log(text);
}
error(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
core.error(text);
}
warning(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
core.warning(text);
}
info(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
console.info(text);
}
log(text, debug) {
if (debug && !this.debug) {
core.debug(text);
return;
}
console.log(text);
}
table(header, data, debug) {
const table = {
header,
data
};
if (debug && !this.debug) {
core.debug(JSON.stringify(table));
return;
}
console.log(JSON.stringify(table));
}
registryResponse(response, debug) {
if (debug && !this.debug) {
core.debug(response.text);
return;
}
if (response.type === trm_registry_types_1.MessageType.ERROR) {
this.error(response.text, debug);
}
if (response.type === trm_registry_types_1.MessageType.INFO) {
this.info(response.text, debug);
}
if (response.type === trm_registry_types_1.MessageType.WARNING) {
this.warning(response.text, debug);
}
}
tree(data, debug) {
if (debug && !this.debug) {
core.debug(JSON.stringify(data));
return;
}
console.log(JSON.stringify(data));
}
}
exports.GithubLogger = GithubLogger;
51 changes: 30 additions & 21 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,45 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const publish_1 = require("./publish");
var releaseTimeout;
try {
releaseTimeout = parseInt(core.getInput('releaseTimeout'));
}
catch (e) {
core.setFailed(`Invalid release timeout value.`);
}
(0, publish_1.publish)({
githubToken: core.getInput('githubToken'),
registryEndpoint: core.getInput('registryEndpoint'),
registryAuth: core.getInput('registryAuth'),
systemDest: core.getInput('systemDest'),
systemAsHost: core.getInput('systemAsHost'),
systemSysNr: core.getInput('systemSysNr'),
systemSapRouter: core.getInput('systemSapRouter'),
systemSysnr: core.getInput('systemSysnr'),
systemClient: core.getInput('systemClient'),
systemLang: core.getInput('systemLang'),
systemUser: core.getInput('systemUser'),
systemPassword: core.getInput('systemPassword'),
packageName: core.getInput('packageName'),
packageVersion: core.getInput('packageVersion'),
packageDescription: core.getInput('packageDescription'),
packageGit: core.getInput('packageGit'),
packageWebsite: core.getInput('packageWebsite'),
packagePrivate: core.getBooleanInput('packagePrivate'),
packageLicense: core.getInput('packageLicense'),
packageKeywords: core.getInput('packageKeywords'),
packageAuthors: core.getInput('packageAuthors'),
packageBackwardsCompatible: core.getBooleanInput('packageBackwardsCompatible'),
packageSapEntries: core.getInput('packageSapEntries'),
packageDependencies: core.getInput('packageDependencies'),
systemLang: core.getInput('systemLang'),
devclass: core.getInput('devclass'),
target: core.getInput('target'),
readme: core.getInput('readme'),
releaseTimeout: parseInt(core.getInput('releaseTimeout')),
registryEndpoint: core.getInput('registryEndpoint'),
packageName: core.getInput('packageName'),
packageVersion: core.getInput('packageVersion'),
releaseTimeout,
overwriteManifestValues: core.getBooleanInput('overwriteManifestValues'),
skipDependencies: core.getBooleanInput('skipDependencies'),
skipTrLang: core.getBooleanInput('skipTrLang')
skipLang: core.getBooleanInput('skipLang'),
backwardsCompatible: core.getBooleanInput('backwardsCompatible'),
simpleLog: core.getBooleanInput('simpleLog'),
description: core.getInput('description'),
private: core.getBooleanInput('private'),
git: core.getInput('git'),
website: core.getInput('website'),
license: core.getInput('license'),
authors: core.getInput('authors'),
keywords: core.getInput('keywords'),
readme: core.getInput('readme'),
custTransports: core.getInput('custTransports'),
dependencies: core.getInput('dependencies'),
sapEntries: core.getInput('sapEntries'),
registryAuth: core.getInput('registryAuth'),
tmpFolder: core.getInput('tmpFolder'),
}).then(() => {
console.log("Package published.");
}).catch(err => {
Expand Down
Loading

0 comments on commit c253df6

Please sign in to comment.