hnc-rn-image-overlay 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hnc-rn-image-overlay",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Native module to add overlay and text watermark to images for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,66 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- echo "📦 React Native Image Overlay - Publish Script"
6
- echo ""
7
-
8
- # Colors
9
- RED='\033[0;31m'
10
- GREEN='\033[0;32m'
11
- YELLOW='\033[1;33m'
12
- NC='\033[0m' # No Color
13
-
14
- # Check if git is clean
15
- if [[ -n $(git status -s) ]]; then
16
- echo -e "${RED}❌ Git working directory is not clean. Please commit all changes first.${NC}"
17
- git status -s
18
- exit 1
19
- fi
20
-
21
- echo -e "${GREEN}✓${NC} Git working directory is clean"
22
-
23
- # Get current version
24
- VERSION=$(node -p "require('./package.json').version")
25
- echo -e "Current version: ${YELLOW}$VERSION${NC}"
26
-
27
- # Check if npm is logged in
28
- if ! npm whoami > /dev/null 2>&1; then
29
- echo -e "${RED}❌ Not logged in to npm. Please run 'npm login' first.${NC}"
30
- exit 1
31
- fi
32
-
33
- echo -e "${GREEN}✓${NC} Logged in to npm as $(npm whoami)"
34
-
35
- # Dry run
36
- echo ""
37
- echo "Running dry-run to check package contents..."
38
- npm pack --dry-run
39
-
40
- echo ""
41
- echo -e "${YELLOW}Ready to publish version $VERSION${NC}"
42
- read -p "Do you want to continue? (y/N) " -n 1 -r
43
- echo ""
44
-
45
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
46
- echo "Aborted."
47
- exit 1
48
- fi
49
-
50
- # Publish
51
- echo ""
52
- echo "Publishing to npm..."
53
- npm publish
54
-
55
- # Create git tag
56
- TAG="v$VERSION"
57
- echo ""
58
- echo "Creating git tag $TAG..."
59
- git tag "$TAG"
60
- git push origin "$TAG"
61
-
62
- echo ""
63
- echo -e "${GREEN}✅ Successfully published version $VERSION!${NC}"
64
- echo ""
65
- echo "View package: https://www.npmjs.com/package/hnc-rn-image-overlay"
66
- echo "Install with: npm install hnc-rn-image-overlay"
@@ -1,65 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- echo "📦 React Native Image Overlay - Version Bump Script"
6
- echo ""
7
-
8
- # Colors
9
- RED='\033[0;31m'
10
- GREEN='\033[0;32m'
11
- YELLOW='\033[1;33m'
12
- NC='\033[0m' # No Color
13
-
14
- # Check if argument provided
15
- if [ -z "$1" ]; then
16
- echo "Usage: ./scripts/version.sh [patch|minor|major|X.Y.Z]"
17
- echo ""
18
- echo "Examples:"
19
- echo " ./scripts/version.sh patch # 1.0.0 -> 1.0.1"
20
- echo " ./scripts/version.sh minor # 1.0.0 -> 1.1.0"
21
- echo " ./scripts/version.sh major # 1.0.0 -> 2.0.0"
22
- echo " ./scripts/version.sh 1.2.3 # Set to specific version"
23
- exit 1
24
- fi
25
-
26
- VERSION_TYPE=$1
27
- CURRENT_VERSION=$(node -p "require('./package.json').version")
28
-
29
- echo -e "Current version: ${YELLOW}$CURRENT_VERSION${NC}"
30
-
31
- # Check if git is clean
32
- if [[ -n $(git status -s) ]]; then
33
- echo -e "${RED}❌ Git working directory is not clean. Please commit all changes first.${NC}"
34
- git status -s
35
- exit 1
36
- fi
37
-
38
- # Bump version
39
- echo ""
40
- echo "Bumping version ($VERSION_TYPE)..."
41
-
42
- if [[ $VERSION_TYPE =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
43
- # Specific version
44
- npm version $VERSION_TYPE --no-git-tag-version
45
- else
46
- # patch/minor/major
47
- npm version $VERSION_TYPE --no-git-tag-version
48
- fi
49
-
50
- NEW_VERSION=$(node -p "require('./package.json').version")
51
-
52
- echo -e "${GREEN}✓${NC} Version bumped to ${GREEN}$NEW_VERSION${NC}"
53
-
54
- # Commit
55
- echo ""
56
- echo "Committing version bump..."
57
- git add package.json
58
- git commit -m "Bump version to $NEW_VERSION"
59
-
60
- echo ""
61
- echo -e "${GREEN}✅ Done!${NC}"
62
- echo ""
63
- echo "Next steps:"
64
- echo " 1. Push changes: git push"
65
- echo " 2. Publish: npm run publish or ./scripts/publish.sh"