@momo-kits/native-kits 0.156.1-test.5-debug → 0.156.1-test.7-debug

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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.156.1-test.5-debug"
43
+ version = "0.156.1-test.7-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.155.1-beta.10'
3
+ spec.version = '0.156.1-beta.2'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.156.1-test.5
21
+ version=0.156.1-test.7
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.156.1-test.5-debug",
3
+ "version": "0.156.1-test.7-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
@@ -14,42 +14,84 @@ fi
14
14
 
15
15
  echo "📦 Version from package.json: $VERSION"
16
16
 
17
- # Check if this version already exists on npm
17
+ # Check if version has prerelease suffix and convert to beta format if needed
18
+ if [[ "$VERSION" == *"-"* ]]; then
19
+ # Extract base version (e.g., 0.156.1 from 0.156.1-test.5)
20
+ BASE_VERSION=$(echo "$VERSION" | cut -d'-' -f1)
21
+ PRERELEASE_SUFFIX=$(echo "$VERSION" | cut -d'-' -f2)
22
+
23
+ # If it's not already in beta format, convert to beta.1
24
+ if [[ "$PRERELEASE_SUFFIX" != "beta."* ]]; then
25
+ BETA_VERSION="${BASE_VERSION}-beta.1"
26
+ echo "🔄 Converting to beta format: $VERSION → $BETA_VERSION"
27
+
28
+ # Update package.json with beta version
29
+ if [[ "$OSTYPE" == "darwin"* ]]; then
30
+ # macOS
31
+ sed -i '' "s/\"version\": \"$VERSION\"/\"version\": \"$BETA_VERSION\"/" package.json
32
+ else
33
+ # Linux
34
+ sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$BETA_VERSION\"/" package.json
35
+ fi
36
+
37
+ VERSION="$BETA_VERSION"
38
+ echo "✅ Version updated to beta format: $VERSION"
39
+ fi
40
+ fi
41
+
42
+ # Check if this version already exists on npm and increment until we find one that doesn't
18
43
  PACKAGE_NAME=$(node -p "require('./package.json').name")
19
44
  echo "🔎 Checking if version $VERSION already exists on npm for package $PACKAGE_NAME..."
20
45
 
21
- # Try to get the version info from npm
22
- NPM_VERSION_INFO=$(npm view "$PACKAGE_NAME@$VERSION" version 2>/dev/null || echo "")
23
-
24
- if [ -n "$NPM_VERSION_INFO" ]; then
25
- echo "⚠️ Version $VERSION already exists on npm. Auto-incrementing patch version..."
26
-
27
- # Split version into parts (e.g., 1.2.0 -> 1.2.0)
28
- # Extract major.minor.patch
29
- MAJOR=$(echo "$VERSION" | cut -d'.' -f1)
30
- MINOR=$(echo "$VERSION" | cut -d'.' -f2)
31
- PATCH=$(echo "$VERSION" | cut -d'.' -f3 | cut -d'-' -f1)
46
+ # Loop until we find a version that doesn't exist on npm
47
+ while true; do
48
+ # Try to get the version info from npm
49
+ NPM_VERSION_INFO=$(npm view "$PACKAGE_NAME@$VERSION" version 2>/dev/null || echo "")
32
50
 
33
- # Increment patch version
34
- NEW_PATCH=$((PATCH + 1))
35
- NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
36
-
37
- echo " Version incremented: $VERSION $NEW_VERSION"
38
-
39
- # Update package.json with new version
40
- if [[ "$OSTYPE" == "darwin"* ]]; then
41
- # macOS
42
- sed -i '' "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" package.json
51
+ if [ -n "$NPM_VERSION_INFO" ]; then
52
+ echo "⚠️ Version $VERSION already exists on npm. Auto-incrementing version..."
53
+
54
+ # Check if it's a beta version
55
+ if [[ "$VERSION" == *"-beta."* ]]; then
56
+ # Extract base version and beta number (e.g., 0.156.1-beta.5)
57
+ BASE_VERSION=$(echo "$VERSION" | cut -d'-' -f1)
58
+ BETA_NUMBER=$(echo "$VERSION" | cut -d'.' -f4)
59
+
60
+ # Increment beta number
61
+ NEW_BETA_NUMBER=$((BETA_NUMBER + 1))
62
+ NEW_VERSION="${BASE_VERSION}-beta.${NEW_BETA_NUMBER}"
63
+
64
+ echo " Version incremented: $VERSION → $NEW_VERSION"
65
+ else
66
+ # Regular version without beta suffix
67
+ # Extract major.minor.patch
68
+ MAJOR=$(echo "$VERSION" | cut -d'.' -f1)
69
+ MINOR=$(echo "$VERSION" | cut -d'.' -f2)
70
+ PATCH=$(echo "$VERSION" | cut -d'.' -f3 | cut -d'-' -f1)
71
+
72
+ # Increment patch version
73
+ NEW_PATCH=$((PATCH + 1))
74
+ NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
75
+
76
+ echo " Version incremented: $VERSION → $NEW_VERSION"
77
+ fi
78
+
79
+ # Update package.json with new version
80
+ if [[ "$OSTYPE" == "darwin"* ]]; then
81
+ # macOS
82
+ sed -i '' "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" package.json
83
+ else
84
+ # Linux
85
+ sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" package.json
86
+ fi
87
+
88
+ VERSION="$NEW_VERSION"
89
+ echo "🔄 Checking version $VERSION on npm..."
43
90
  else
44
- # Linux
45
- sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" package.json
91
+ echo "✅ Version $VERSION does not exist on npm. Using this version."
92
+ break
46
93
  fi
47
-
48
- VERSION="$NEW_VERSION"
49
- echo "✅ Version updated to: $VERSION"
50
- else
51
- echo "✅ Version $VERSION does not exist on npm. Using current version."
52
- fi
94
+ done
53
95
 
54
96
  # Update gradle.properties with the same version
55
97
  echo "📝 Updating gradle.properties..."