abapgit-agent 1.1.2 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +23 -14
- package/RELEASE_NOTES.md +14 -0
- package/package.json +1 -1
- package/scripts/release.sh +60 -0
|
@@ -36,11 +36,29 @@ jobs:
|
|
|
36
36
|
id: get_tag
|
|
37
37
|
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
38
38
|
|
|
39
|
-
- name:
|
|
40
|
-
id:
|
|
39
|
+
- name: Check for release notes file
|
|
40
|
+
id: check_release_notes
|
|
41
|
+
run: |
|
|
42
|
+
if [ -f "RELEASE_NOTES.md" ]; then
|
|
43
|
+
echo "RELEASE_FILE=true" >> $GITHUB_OUTPUT
|
|
44
|
+
else
|
|
45
|
+
echo "RELEASE_FILE=false" >> $GITHUB_OUTPUT
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
- name: Read release notes from file
|
|
49
|
+
if: steps.check_release_notes.outputs.RELEASE_FILE == 'true'
|
|
50
|
+
id: release_notes_file
|
|
51
|
+
run: |
|
|
52
|
+
{
|
|
53
|
+
echo 'RELEASE_NOTES<<EOF'
|
|
54
|
+
cat RELEASE_NOTES.md
|
|
55
|
+
echo 'EOF'
|
|
56
|
+
} >> $GITHUB_OUTPUT
|
|
57
|
+
|
|
58
|
+
- name: Generate default release notes
|
|
59
|
+
if: steps.check_release_notes.outputs.RELEASE_FILE == 'false'
|
|
60
|
+
id: release_notes_default
|
|
41
61
|
run: |
|
|
42
|
-
CURRENT_TAG="${GITHUB_REF#refs/tags/}"
|
|
43
|
-
# List all commits since the repo began (or use a fixed starting point)
|
|
44
62
|
CHANGES=$(git log --pretty=format:"- %s (%h)" -20)
|
|
45
63
|
echo "CHANGES=$CHANGES" >> $GITHUB_OUTPUT
|
|
46
64
|
|
|
@@ -49,13 +67,4 @@ jobs:
|
|
|
49
67
|
with:
|
|
50
68
|
tag_name: ${{ steps.get_tag.outputs.VERSION }}
|
|
51
69
|
name: Release ${{ steps.get_tag.outputs.VERSION }}
|
|
52
|
-
body:
|
|
53
|
-
## What's New
|
|
54
|
-
|
|
55
|
-
${{ steps.release_notes.outputs.CHANGES }}
|
|
56
|
-
|
|
57
|
-
## Installation
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm install -g abapgit-agent
|
|
61
|
-
```
|
|
70
|
+
body: ${{ steps.release_notes_file.outputs.CONTENT }}
|
package/RELEASE_NOTES.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## What's New
|
|
2
|
+
|
|
3
|
+
- Added `create` command to create online repository in ABAP system
|
|
4
|
+
- Added `import` command to import objects from ABAP package to git
|
|
5
|
+
- Added unit tests for create and import commands
|
|
6
|
+
- Added GitHub Actions workflow for automated npm releases
|
|
7
|
+
- Improved .gitignore handling in init command (adds .abapGitAgent and cookies file)
|
|
8
|
+
- Updated commands documentation
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g abapgit-agent
|
|
14
|
+
```
|
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Release script for abapgit-agent
|
|
4
|
+
# Usage: ./scripts/release.sh
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
echo "=== abapgit-agent Release Script ==="
|
|
9
|
+
echo
|
|
10
|
+
|
|
11
|
+
# Get current version
|
|
12
|
+
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
13
|
+
echo "Current version: $CURRENT_VERSION"
|
|
14
|
+
echo
|
|
15
|
+
|
|
16
|
+
# Ask for version bump type
|
|
17
|
+
echo "Select version bump type:"
|
|
18
|
+
echo " 1) patch (${CURRENT_VERSION} -> ${CURRENT_VERSION%.*}.$((${CURRENT_VERSION##*.}+1)))"
|
|
19
|
+
echo " 2) minor (${CURRENT_VERSION} -> $(((${CURRENT_VERSION%%.*})+1)).0)"
|
|
20
|
+
echo " 3) major ($(((${CURRENT_VERSION%%.*})+1)).0.0)"
|
|
21
|
+
echo " 4) custom"
|
|
22
|
+
read -p "Enter choice (1-4): " CHOICE
|
|
23
|
+
|
|
24
|
+
case $CHOICE in
|
|
25
|
+
1) npm version patch ;;
|
|
26
|
+
2) npm version minor ;;
|
|
27
|
+
3) npm version major ;;
|
|
28
|
+
4)
|
|
29
|
+
read -p "Enter new version: " NEW_VERSION
|
|
30
|
+
npm version $NEW_VERSION
|
|
31
|
+
;;
|
|
32
|
+
*)
|
|
33
|
+
echo "Invalid choice"
|
|
34
|
+
exit 1
|
|
35
|
+
;;
|
|
36
|
+
esac
|
|
37
|
+
|
|
38
|
+
# Get the new version tag
|
|
39
|
+
NEW_TAG="v$(node -p "require('./package.json').version')"
|
|
40
|
+
echo
|
|
41
|
+
echo "Created tag: $NEW_TAG"
|
|
42
|
+
echo
|
|
43
|
+
|
|
44
|
+
# Push to trigger workflow
|
|
45
|
+
read -p "Push to GitHub to trigger release? (y/n): " CONFIRM
|
|
46
|
+
if [ "$CONFIRM" = "y" ]; then
|
|
47
|
+
echo "Pushing to GitHub..."
|
|
48
|
+
git push public --follow-tags
|
|
49
|
+
echo
|
|
50
|
+
echo "=== Release triggered! ==="
|
|
51
|
+
echo "Tag: $NEW_TAG"
|
|
52
|
+
echo
|
|
53
|
+
echo "Next steps:"
|
|
54
|
+
echo "1. Go to https://github.com/SylvosCai/abapgit-agent/releases"
|
|
55
|
+
echo "2. Edit the release to add 'What's New' information"
|
|
56
|
+
echo "3. Publish the release"
|
|
57
|
+
else
|
|
58
|
+
echo "Aborted. Tag $NEW_TAG created locally."
|
|
59
|
+
echo "To push manually: git push public --follow-tags"
|
|
60
|
+
fi
|