squash-only 1.0.2 → 1.0.4

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/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  A bash script to automatically configure all your GitHub repositories to use squash-only merge strategy.
4
4
 
5
+ ## Quick start
6
+
7
+ ```bash
8
+ npx squash-only
9
+ ```
10
+
5
11
  ## What it does
6
12
 
7
13
  This script updates all repositories you own on GitHub to:
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "squash-only",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Scripts for making all your repos on GitHub Squash Only!",
5
5
  "bin": {
6
6
  "squash-only": "./bin/squash-only.js"
7
7
  },
8
8
  "files": [
9
9
  "bin",
10
- "scripts",
10
+ "scripts/squash-only.sh",
11
11
  "README.md",
12
12
  "LICENSE"
13
13
  ],
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # Internal script for tagging the current version of the npm package.
4
-
5
- set -e
6
-
7
- # Get the script directory and project root
8
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
- PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
10
-
11
- # Extract version from package.json
12
- VERSION=$(jq -r '.version' "$PROJECT_ROOT/package.json")
13
-
14
- if [ -z "$VERSION" ]; then
15
- echo "Error: Could not extract version from package.json" >&2
16
- exit 1
17
- fi
18
-
19
- TAG_NAME="release/v$VERSION"
20
-
21
- # Check if tag already exists
22
- if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
23
- echo "Error: Tag '$TAG_NAME' already exists" >&2
24
- exit 1
25
- fi
26
-
27
- echo "Creating git tag: $TAG_NAME"
28
-
29
- # Create the tag
30
- git tag "$TAG_NAME"
31
-
32
- echo "Tag created successfully: $TAG_NAME"
33
- echo "Pushing all tags..."
34
-
35
- # Push all tags
36
- git push --tags
37
-
38
- echo "All tags pushed successfully!"
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # Internal script for publishing the npm package and tagging the current version.
4
-
5
- set -e
6
-
7
- # Get the script directory and project root
8
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
- PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
10
-
11
- echo "Publishing npm package..."
12
- cd "$PROJECT_ROOT"
13
-
14
- # Publish the npm package to npm
15
- npm publish
16
-
17
- # Call the git tag script to tag the release
18
- "$SCRIPT_DIR/git_tag_current_version.sh"