-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
41 lines (31 loc) · 810 Bytes
/
Copy pathdeploy.sh
File metadata and controls
41 lines (31 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# npm publish --access public
# npm version patch # For bug fixes
# npm version minor # For new features
# npm version major # For breaking changes
# npm publish
#scoped project
# {
# "name": "@your-username/my-awesome-package",
# "version": "1.0.0",
# "main": "index.js"
# }
#!/bin/bash
# Ask for version type using select
echo "Select the type of version update:"
select version_type in "patch" "minor" "major"; do
case $version_type in
patch|minor|major)
echo "You selected '$version_type' update."
break
;;
*)
echo "Invalid selection. Please choose 1, 2, or 3."
;;
esac
done
# Run npm version
npm version $version_type
# Publish to npm
echo "Publishing to npm with --access public..."
npm publish --access public
echo "✅ Deployment complete!"