@windward/integrations 0.14.0 → 0.15.0
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/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Checkout the release branch
|
|
4
|
+
git checkout master || exit 1
|
|
5
|
+
git pull origin master || exit 1
|
|
6
|
+
|
|
7
|
+
# Configure Git user for the current repository
|
|
8
|
+
git config user.email "commits-noreply@bitbucket.org"
|
|
9
|
+
git config user.name "bitbucket-pipelines"
|
|
10
|
+
|
|
11
|
+
# Extract version from the last merge commit message. Expecting `Merged in xx.xx.xx`
|
|
12
|
+
VERSION=$(basename "$(git log -1 --pretty=%B | grep -o -E "Merged in (release|hotfix)\/([0-9]+\.[0-9]+\.[0-9]+)")")
|
|
13
|
+
|
|
14
|
+
if [ -z "$VERSION" ]; then
|
|
15
|
+
echo "Error: Could not extract version from release branch name."
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "Running auto-rc-tag delete for version $VERSION"
|
|
20
|
+
|
|
21
|
+
# Delete all rc tags for the version
|
|
22
|
+
rc_tags=$(git tag --list "$VERSION-rc*")
|
|
23
|
+
|
|
24
|
+
if [ -n "$rc_tags" ]; then
|
|
25
|
+
echo "Deleting rc tags for version $VERSION..."
|
|
26
|
+
for tag in $rc_tags; do
|
|
27
|
+
git tag -d "$tag"
|
|
28
|
+
git push origin ":refs/tags/$tag"
|
|
29
|
+
done
|
|
30
|
+
echo "All rc tags for version $VERSION have been deleted."
|
|
31
|
+
else
|
|
32
|
+
echo "No rc tags found for version $VERSION."
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
exit 0
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Checkout the release branch
|
|
4
|
+
git checkout master || exit 1
|
|
5
|
+
git pull origin master || exit 1
|
|
6
|
+
|
|
7
|
+
# Configure Git user for the current repository
|
|
8
|
+
git config user.email "commits-noreply@bitbucket.org"
|
|
9
|
+
git config user.name "bitbucket-pipelines"
|
|
10
|
+
|
|
11
|
+
# Extract version from the last merge commit message. Expecting `Merged in xx.xx.xx`
|
|
12
|
+
VERSION=$(basename "$(git log -1 --pretty=%B | grep -o -E "Merged in (release|hotfix)\/([0-9]+\.[0-9]+\.[0-9]+)")")
|
|
13
|
+
|
|
14
|
+
if [ -z "$VERSION" ]; then
|
|
15
|
+
echo "Error: Could not extract version from release branch name."
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "Running auto-tag for version $VERSION"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Fetch the latest state of the repository
|
|
23
|
+
git fetch origin
|
|
24
|
+
|
|
25
|
+
# Get the latest commit on master branch
|
|
26
|
+
LATEST_MASTER_COMMIT=$(git rev-parse origin/master)
|
|
27
|
+
if [ $? -ne 0 ]; then
|
|
28
|
+
echo "Error: Failed to get the latest commit on master"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Apply the tag to the latest master commit
|
|
33
|
+
git tag -a "$VERSION" -m "Tagging $VERSION" "$LATEST_MASTER_COMMIT"
|
|
34
|
+
if [ $? -ne 0 ]; then
|
|
35
|
+
echo "Error: Failed to tag the commit $LATEST_MASTER_COMMIT with tag $VERSION"
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Push the tag to the repository
|
|
40
|
+
git push origin "$VERSION"
|
|
41
|
+
if [ $? -ne 0 ]; then
|
|
42
|
+
echo "Error: Failed to push the tag $VERSION"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
echo "Tag $VERSION successfully applied to commit $LATEST_MASTER_COMMIT and pushed to repository."
|
|
47
|
+
|
|
48
|
+
exit 0
|
package/bitbucket-pipelines.yml
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
image: atlassian/default-image:3
|
|
2
2
|
|
|
3
3
|
pipelines:
|
|
4
|
+
pull-requests:
|
|
5
|
+
'**':
|
|
6
|
+
- step:
|
|
7
|
+
name: Build and test
|
|
8
|
+
image: node:16.20.2
|
|
9
|
+
script:
|
|
10
|
+
- npm install
|
|
11
|
+
- npm run test
|
|
4
12
|
custom:
|
|
5
13
|
create-release:
|
|
6
14
|
import: infrastructure-automation:master:create-release
|
|
@@ -11,4 +19,6 @@ pipelines:
|
|
|
11
19
|
"release/*":
|
|
12
20
|
import: infrastructure-automation:master:auto-update
|
|
13
21
|
"hotfix/*":
|
|
14
|
-
import: infrastructure-automation:master:auto-update
|
|
22
|
+
import: infrastructure-automation:master:auto-update
|
|
23
|
+
master:
|
|
24
|
+
import: infrastructure-automation:master:auto-publish-release
|