tapioca_dsl_compiler_store_model 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/bump_version.sh +115 -0
- data/lib/tapioca_dsl_compiler_store_model/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689feb6b0f729da2e31fb54ccd86d46c0935bfe71b5cbed5577efe3da01f9b21
|
4
|
+
data.tar.gz: 2e9d3597bd1d72f1442121f9c7e080ff95518b6943587c0479d4335b89cf8b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 817a84a2cae1bfb78c79a968466587af3bcbfa6cced1c2539aa99bc4cd719437a60b66ed60af946798634ea64b8ad8b515b9c7e464b52562ba7e00901f5ccf68
|
7
|
+
data.tar.gz: 7f3a3ed573f710b044d38524a2a71510a331e39aebb8e98b7bc9f7a7776a0481d713dd57167069a75680b7894d062b68324036855b5d286b47ba6a62388da75f
|
data/bump_version.sh
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Script to bump gem version
|
4
|
+
# Usage examples:
|
5
|
+
# ./bump_version.sh patch
|
6
|
+
# ./bump_version.sh minor
|
7
|
+
# ./bump_version.sh major
|
8
|
+
# ./bump_version.sh 1.2.3
|
9
|
+
|
10
|
+
set -e
|
11
|
+
|
12
|
+
BUMP_TYPE="$1"
|
13
|
+
|
14
|
+
if [ -z "$BUMP_TYPE" ]; then
|
15
|
+
echo "Usage: $0 <patch|minor|major|x.y.z>"
|
16
|
+
echo "Examples:"
|
17
|
+
echo " $0 patch # 1.0.0 -> 1.0.1"
|
18
|
+
echo " $0 minor # 1.0.1 -> 1.1.0"
|
19
|
+
echo " $0 major # 1.1.0 -> 2.0.0"
|
20
|
+
echo " $0 1.2.3 # Set specific version"
|
21
|
+
exit 1
|
22
|
+
fi
|
23
|
+
|
24
|
+
# Get current version
|
25
|
+
get_current_version() {
|
26
|
+
# Try to find version.rb in common locations
|
27
|
+
for version_file in lib/version.rb lib/*/version.rb; do
|
28
|
+
if [ -f "$version_file" ]; then
|
29
|
+
grep -o "VERSION = ['\"][^'\"]*['\"]" "$version_file" | cut -d"'" -f2 | cut -d'"' -f2
|
30
|
+
return
|
31
|
+
fi
|
32
|
+
done
|
33
|
+
echo "0.0.0"
|
34
|
+
}
|
35
|
+
|
36
|
+
# Bump version
|
37
|
+
bump_version() {
|
38
|
+
local current="$1"
|
39
|
+
local type="$2"
|
40
|
+
|
41
|
+
IFS='.' read -ra VERSION_PARTS <<< "$current"
|
42
|
+
local major="${VERSION_PARTS[0]}"
|
43
|
+
local minor="${VERSION_PARTS[1]}"
|
44
|
+
local patch="${VERSION_PARTS[2]}"
|
45
|
+
|
46
|
+
case "$type" in
|
47
|
+
"patch")
|
48
|
+
patch=$((patch + 1))
|
49
|
+
;;
|
50
|
+
"minor")
|
51
|
+
minor=$((minor + 1))
|
52
|
+
patch=0
|
53
|
+
;;
|
54
|
+
"major")
|
55
|
+
major=$((major + 1))
|
56
|
+
minor=0
|
57
|
+
patch=0
|
58
|
+
;;
|
59
|
+
*)
|
60
|
+
# Specific version is provided
|
61
|
+
echo "$type"
|
62
|
+
return
|
63
|
+
;;
|
64
|
+
esac
|
65
|
+
|
66
|
+
echo "${major}.${minor}.${patch}"
|
67
|
+
}
|
68
|
+
|
69
|
+
# Update files
|
70
|
+
update_files() {
|
71
|
+
local new_version="$1"
|
72
|
+
|
73
|
+
# Update version.rb
|
74
|
+
if [ -f "lib/version.rb" ]; then
|
75
|
+
sed -i.bak "s/VERSION = ['\"][^'\"]*['\"]/VERSION = \"${new_version}\"/" lib/version.rb
|
76
|
+
rm lib/version.rb.bak
|
77
|
+
fi
|
78
|
+
|
79
|
+
# Update lib/gem_name/version.rb
|
80
|
+
for version_file in lib/*/version.rb; do
|
81
|
+
if [ -f "$version_file" ]; then
|
82
|
+
sed -i.bak "s/VERSION = ['\"][^'\"]*['\"]/VERSION = \"${new_version}\"/" "$version_file"
|
83
|
+
rm "${version_file}.bak"
|
84
|
+
fi
|
85
|
+
done
|
86
|
+
}
|
87
|
+
|
88
|
+
# Main process
|
89
|
+
CURRENT_VERSION=$(get_current_version)
|
90
|
+
echo "Current version: $CURRENT_VERSION"
|
91
|
+
|
92
|
+
NEW_VERSION=$(bump_version "$CURRENT_VERSION" "$BUMP_TYPE")
|
93
|
+
echo "New version: $NEW_VERSION"
|
94
|
+
|
95
|
+
# Confirmation
|
96
|
+
read -p "Update version to $NEW_VERSION? (y/N): " -n 1 -r
|
97
|
+
echo
|
98
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
99
|
+
update_files "$NEW_VERSION"
|
100
|
+
echo "Version updated to $NEW_VERSION"
|
101
|
+
|
102
|
+
# Update Gemfile.lock if gem references itself
|
103
|
+
if grep -q "remote: \." Gemfile.lock 2>/dev/null; then
|
104
|
+
echo "Updating Gemfile.lock..."
|
105
|
+
bundle update tapioca_dsl_compiler_store_model
|
106
|
+
fi
|
107
|
+
|
108
|
+
echo "Don't forget to:"
|
109
|
+
echo " 1. git add -A"
|
110
|
+
echo " 2. git commit -m 'Bump version to $NEW_VERSION'"
|
111
|
+
echo " 3. git tag v$NEW_VERSION"
|
112
|
+
echo " 4. git push origin main --tags"
|
113
|
+
else
|
114
|
+
echo "Version update cancelled"
|
115
|
+
fi
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapioca_dsl_compiler_store_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- speria-jp
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2025-06-29 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: store_model
|
@@ -47,6 +48,7 @@ extra_rdoc_files: []
|
|
47
48
|
files:
|
48
49
|
- README.md
|
49
50
|
- Rakefile
|
51
|
+
- bump_version.sh
|
50
52
|
- lib/tapioca/dsl/compilers/store_model.rb
|
51
53
|
- lib/tapioca_dsl_compiler_store_model.rb
|
52
54
|
- lib/tapioca_dsl_compiler_store_model/version.rb
|
@@ -58,6 +60,7 @@ metadata:
|
|
58
60
|
homepage_uri: https://github.com/speria-jp/tapioca_dsl_compiler_store_model
|
59
61
|
source_code_uri: https://github.com/speria-jp/tapioca_dsl_compiler_store_model
|
60
62
|
rubygems_mfa_required: 'true'
|
63
|
+
post_install_message:
|
61
64
|
rdoc_options: []
|
62
65
|
require_paths:
|
63
66
|
- lib
|
@@ -72,7 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
75
|
- !ruby/object:Gem::Version
|
73
76
|
version: '0'
|
74
77
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.5.22
|
79
|
+
signing_key:
|
76
80
|
specification_version: 4
|
77
81
|
summary: Tapioca DSL compiler for StoreModel
|
78
82
|
test_files: []
|