Skip to content

Commit 96515b0

Browse files
authored
first commit
1 parent e28fa54 commit 96515b0

File tree

237 files changed

+4863
-19094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+4863
-19094
lines changed

.github/dependabot.yml

-8
This file was deleted.

.github/workflows/cron.yml

-37
This file was deleted.

.gitignore

-3
This file was deleted.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 abap2UI5
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+76-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,83 @@
1-
# abap2UI5 with Renamed Namespace
1+
# abap2UI5-builder
22

3-
This repository demonstrates the automagic namespace renaming functionality. Fork this repository and automatically rename the namespace of abap2UI5.
3+
Automatically create your own abap2UI5 build. Choose your language version and the addons you need.
44

5-
### Features
6-
* create a version for your customer namespace, e.g., /YYY/u5 or /YYY/2ui5.
7-
* create versions for different departments, e.g., z2ui5_mm, z2ui5_pp, etc.
8-
* create release-specific versions, e.g., z2ui5_124, z2ui5_125, etc.
5+
Features:
6+
* Integrates abap2UI5, frontend, and multiple addons into a single project
7+
* Rename all artifacts to your custom namespace
8+
* Supports running multiple builds on the same system
9+
* Install your new build with a single abapGit pull
910

10-
After renaming, you can install abap2UI5 multiple times in the same system.
11+
Find default builds for various use cases [here.](https://github.com/abap2UI5/build)
1112

12-
### Usage
13-
1. Fork this repository
14-
2. Set your new namespace [here](https://github.com/abap2UI5/abap2UI5-mirror-renamed/blob/main/abaplint_rename.json#L16-L17)
15-
3. Run `npm run init` and `npm run main` to mirror [abap2UI5](https://github.com/abap2UI5/abap2UI5) and rename for example `z2ui5` to `/2U5/TEST`
16-
4. Pull the repository with abapGit
17-
5. (Optional) setup a [github action](https://github.com/abap2UI5/abap2UI5-mirror-renamed/blob/main/.github/workflows/cron.yml) to automate this process
13+
### Build Process
14+
1. Fork this repository and adjust the configuration for your build process [here:](https://github.com/abap2UI5/builder/blob/main/build/build.jsonc)
15+
```json
16+
{
17+
"abap_version": "Cloud",
18+
"repositories": [
19+
"abap2UI5",
20+
"layout-variant-management",
21+
"table-maintenance"
22+
]
23+
}
24+
```
25+
Run the clone process:
26+
```
27+
npm run clone
28+
```
29+
2. (optional) Adjust the configuration for your rename process [here](https://github.com/abap2UI5/builder/blob/main/build/rename.jsonc) and run it with:
1830

19-
### Credits
20-
Thank you to [larshp](https://github.com/larshp) and the tool abaplint processing the renaming and [christianguenter2](https://github.com/christianguenter2) for abap2UI5 adjustments.
31+
```
32+
npm run rename
33+
```
34+
3. (optional) Add abaplint static code check [here:](https://github.com/abap2UI5/builder/blob/main/build/abaplint.jsonc)
35+
```
36+
npm run abaplint
37+
```
38+
4. Find your newly generated abapGit project in the `dist` folder. Create a new build branch with:
39+
```
40+
npm run branch
41+
```
42+
5. Pull this branch to your ABAP system, and you're ready to go.
43+
44+
### Automate with GitHub Actions
45+
You can automate this process via github action by using the command:
46+
```sh
47+
npm run build
48+
```
49+
Check out an example [here.](https://github.com/abap2UI5/builder/blob/main/.github/workflows/build.yaml)
50+
51+
### Supported Projects
52+
The following projects are supported:
53+
54+
| Name | Renaming | Cloud | v750 | v702 |
55+
|-----------|----------|--------------|-------------|-------------|
56+
| [abap2UI5](https://github.com/abap2UI5/abap2UI5) | X | X | X | X |
57+
| [samples](https://github.com/abap2UI5/samples) | | X | X | X |
58+
| [layout-variant-management](https://github.com/abap2UI5-addons/layout-variant-management) | X | X | X | |
59+
| [table-maintenance](https://github.com/abap2UI5-addons/table-maintenance) | X | X | X | |
60+
61+
Your project is not listed here? Feel free to send a PR and extend the list [here.](https://github.com/abap2UI5/builder/blob/main/setup/config-repos.jsonc)
62+
63+
###### Legend
64+
* Cloud: S/4 Public Cloud, BTP ABAP Environment
65+
* v750: S/4 Private Cloud, S/4 On-Premise, R/3 NetWeaver 750
66+
* v702: R/3 NetWeaver <750
2167

22-
### Blogs
68+
### Concept
69+
<img width="700" alt="image" src="https://github.com/user-attachments/assets/bad5ed8e-2fa3-4ce4-a0d1-fcd1608b4984" />
70+
71+
72+
###### Namespace
73+
All artifacts are generated under the namespace `zabap2ui5`. This differs from the main repository to allow both versions to coexist on the same system. One version for modifications and contributions (z2ui5), this one for productive usage (zabap2ui5). Just change the `build.json` for the use of your custom namespace.
74+
75+
###### Limitations & Todo
76+
* Renaming for Frontend with customer namespace eg. `/ZZZ/` [here](https://github.com/abap2UI5/abap2UI5/issues/1493)
77+
78+
### Credits
2379
* Automagic standalone renaming of ABAP objects [(SCN - 20.02.2021)](https://community.sap.com/t5/application-development-blog-posts/automagic-standalone-renaming-of-abap-objects/ba-p/13499851)
24-
* Multiple installations of abap2xlsx in the same system [(SCN - 09.12.2023)](https://community.sap.com/t5/application-development-blog-posts/multiple-installations-of-abap2xlsx-in-the-same-system/ba-p/13578241)
80+
* Static Code Checks via [abaplint](https://abaplint.org/) [(contributors)](https://github.com/abaplint/abaplint/graphs/contributors)
81+
82+
### Issues
83+
For bug reports or feature requests, please open an issue.

SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Reporting Security Issues
2+
3+
To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/abap2UI5/builds/security/advisories/new) tab.

abaplint_rename.json

-42
This file was deleted.

build/branch.js

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const { execSync } = require('child_process');
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
// Pfad zur Konfigurationsdatei
6+
const configPath = path.join(__dirname, 'config-build.jsonc');
7+
8+
// Konfigurationsdatei lesen und parsen
9+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
10+
const branchName = config.branchName;
11+
12+
const srcDir = path.join(__dirname, '../dist');
13+
14+
try {
15+
// Check if src directory exists
16+
if (!fs.existsSync(srcDir)) {
17+
throw new Error(`Directory ${srcDir} does not exist.`);
18+
}
19+
20+
// Stash untracked files
21+
execSync('git add -A');
22+
execSync('git stash');
23+
console.log('Stashed untracked files');
24+
25+
// Check if the branch already exists
26+
const branches = execSync('git branch --list').toString();
27+
if (branches.includes(branchName)) {
28+
// Switch to a different branch before deleting the existing branch
29+
execSync('git checkout main');
30+
console.log('Switched to branch main');
31+
32+
// Delete the existing branch
33+
execSync(`git branch -D ${branchName}`);
34+
console.log(`Deleted existing branch '${branchName}'`);
35+
}
36+
37+
// Create a new branch
38+
execSync(`git checkout -b ${branchName}`);
39+
console.log(`Switched to new branch '${branchName}'`);
40+
41+
// Remove all files from the index
42+
execSync('git rm -r --cached .');
43+
console.log('Removed all files from the index');
44+
45+
// Add the contents of the src directory to the index, including hidden files
46+
execSync(`git add ${srcDir}/. && git add ${srcDir}/* -f`);
47+
console.log(`Added contents of ${srcDir} to the index`);
48+
49+
// Commit the changes
50+
execSync(`git commit -m 'Add src contents to ${branchName} branch'`);
51+
console.log('Committed the changes');
52+
53+
// Push the new branch to the remote repository
54+
execSync(`git push origin ${branchName} --force`);
55+
console.log(`Pushed branch '${branchName}' to remote repository`);
56+
57+
} catch (error) {
58+
console.error(`Error: ${error.message}`);
59+
}

build/branch3.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Force checkout to the build branch
6+
git checkout --force build
7+
echo "Switched to branch build"
8+
9+
# Copy all contents from dist to the parent directory, including hidden files
10+
shopt -s dotglob
11+
cp -r dist/* .
12+
echo "Copied all contents from dist to the parent directory"
13+
14+
# Delete the dist directory
15+
rm -rf dist
16+
echo "Deleted directory dist"
17+
18+
# Add all changes to the index
19+
git add -A
20+
echo "Added all changes to the index"
21+
22+
# Commit the changes
23+
git commit -m "Commit message"
24+
echo "Committed the changes"
25+
26+
# Push the changes to the remote build branch
27+
git push origin build
28+
echo "Pushed changes to branch build on remote repository"
29+
30+
git checkout --force main

0 commit comments

Comments
 (0)