debugbar 0.4.1 → 0.4.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.
data/release.sh ADDED
@@ -0,0 +1,70 @@
1
+ #!/bin/bash
2
+
3
+ # Check if e_arrow is defined (ie: I'm on my laptop); if not, use echo
4
+ if ! declare -f e_arrow >/dev/null; then
5
+ e_arrow() { printf "➜ %s\n" "$@"; }
6
+ e_success() { printf "✔ %s\n" "$@"; }
7
+ e_error() { printf "✖ %s\n" "$@"; }
8
+ e_note() { printf "Note: %s\n" "$@"; }
9
+ fi
10
+
11
+ # Step 1: Prompt for the version number
12
+ e_arrow "Enter the new version number (e.g., 0.4.2):"
13
+ read NEW_VERSION
14
+
15
+ if [[ -z "$NEW_VERSION" ]]; then
16
+ e_error "Error: You must provide a valid version number."
17
+ exit 1
18
+ fi
19
+
20
+ # Step 2: Update the version in `version.rb`
21
+ VERSION_FILE="lib/debugbar/version.rb"
22
+ if [[ -f "$VERSION_FILE" ]]; then
23
+ sed -i.bak "s/VERSION = \".*\"/VERSION = \"$NEW_VERSION\"/" $VERSION_FILE && rm "${VERSION_FILE}.bak"
24
+ e_success "Version updated to $NEW_VERSION in $VERSION_FILE"
25
+ else
26
+ e_error "Error: $VERSION_FILE not found."
27
+ exit 1
28
+ fi
29
+
30
+ # Step 3: Update the CHANGELOG.md
31
+ CHANGELOG_FILE="CHANGELOG.md"
32
+ CURRENT_DATE=$(date +'%Y-%m-%d')
33
+ if [[ -f "$CHANGELOG_FILE" ]]; then
34
+ # Replace "UNRELEASED" with the new version and current date
35
+ sed -i.bak "s/## UNRELEASED/## v$NEW_VERSION - $CURRENT_DATE/" $CHANGELOG_FILE && rm "${CHANGELOG_FILE}.bak"
36
+ e_success "Changelog updated with version $NEW_VERSION and date $CURRENT_DATE."
37
+ else
38
+ e_error "Error: $CHANGELOG_FILE not found."
39
+ exit 1
40
+ fi
41
+
42
+ # Step 4: Run the build script
43
+ BUILD_SCRIPT="./build_client.sh"
44
+ if [[ -f "$BUILD_SCRIPT" ]]; then
45
+ bash $BUILD_SCRIPT
46
+ e_success "Build script completed."
47
+ else
48
+ e_error "Error: $BUILD_SCRIPT not found."
49
+ exit 1
50
+ fi
51
+
52
+ # Step 5: Commit the changes
53
+ e_arrow "Committing the changes..."
54
+ git add $VERSION_FILE $CHANGELOG_FILE
55
+ git commit -m "v$NEW_VERSION"
56
+ e_arrow "Tagging the release..."
57
+ git tag -a "v$NEW_VERSION"
58
+ e_arrow "Pushing the changes..."
59
+ git push origin master
60
+ git push origin "v$NEW_VERSION"
61
+ e_success "$NEW_VERSION published on GitHub."
62
+
63
+ # Step 7: Publish the release on RubyGems
64
+ e_note "Publishing on RubyGems.org should require 2FA code"
65
+ gem build debugbar.gemspec
66
+ gem push "debugbar-$NEW_VERSION.gem"
67
+ e_success "$NEW_VERSION published on RubyGems."
68
+
69
+ echo
70
+ echo "Done."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Bourdeau
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -83,6 +83,7 @@ files:
83
83
  - lib/debugbar/version.rb
84
84
  - public/.gitignore
85
85
  - public/debugbar.js
86
+ - release.sh
86
87
  - sig/debugbar.rbs
87
88
  homepage: https://debugbar.dev
88
89
  licenses: