squash-only 1.0.1 → 1.0.3

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,13 +1,13 @@
1
1
  {
2
2
  "name": "squash-only",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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,41 +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
- # Note: Using [[:space:]] instead of \s for POSIX compatibility.
13
- # macOS uses BSD sed which doesn't support \s, while GNU sed (Linux) does.
14
- # [[:space:]] works on both BSD and GNU sed.
15
- VERSION=$(sed -n 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' "$PROJECT_ROOT/package.json" | head -1)
16
-
17
- if [ -z "$VERSION" ]; then
18
- echo "Error: Could not extract version from package.json" >&2
19
- exit 1
20
- fi
21
-
22
- TAG_NAME="release/v$VERSION"
23
-
24
- # Check if tag already exists
25
- if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
26
- echo "Error: Tag '$TAG_NAME' already exists" >&2
27
- exit 1
28
- fi
29
-
30
- echo "Creating git tag: $TAG_NAME"
31
-
32
- # Create the tag
33
- git tag "$TAG_NAME"
34
-
35
- echo "Tag created successfully: $TAG_NAME"
36
- echo "Pushing all tags..."
37
-
38
- # Push all tags
39
- git push --tags
40
-
41
- 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"