migrate-hack 0.1.5 → 0.1.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/migrate-hack.sh +3 -2
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 874ef296521001a221bd359339e293ed9642cce1766576f7898288e86359ec24
4
- data.tar.gz: 15073d4e18ec808748fe9b11261376031b0fba0a4a92e7b2fd6230db0419be5a
3
+ metadata.gz: 5b39f60fddc3e521f2c376c16a372884d038c07568436e396cb91f2bcca9c837
4
+ data.tar.gz: 29e9b467f17aea9c9ef576ccdf37b8a94f986ca931c66ebcfc81de4887647156
5
5
  SHA512:
6
- metadata.gz: d77f1ed113875d78a62c3173a3af6dfcfdfa826cd5dd2a107ce1da3f5a60553977a6e0ec93f0e519814caaa56aa737d538e5e820ba6a4ed8cdd74fa1007a966f
7
- data.tar.gz: da92430bd921647d493c7c3d2f263818dcfcee1a88398d6958c8c78317f291c167c3ff260841376d5b263c3b00c39ed53ced4801a010f03010f86d6faebacca8
6
+ metadata.gz: e76f66f8c33421a08264fca8e898ede3623b4fbc06a429894b85094034c9daef1bbdf0e701276ee7d9ecf48a57d416135d40b86d624bba9ede7f04d9e9c7760c
7
+ data.tar.gz: 73e1ba51caef4edf4066a57368bbf580ec7ea49da35b9e732594f20aa946196525c84f202d29c201187259a09208802d048c27f546f5cf8f3621382dafed0235
data/bin/migrate-hack.sh CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ENV_FILE=""
4
4
  COPY_DIR=""
5
+ CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
5
6
 
6
7
  renew_git() {
7
8
  if [[ -n $(git status --porcelain) ]]; then
@@ -86,12 +87,12 @@ while read -r TIMESTAMP MIGRATION COMMIT; do
86
87
 
87
88
  cp -r "$COPY_DIR/." "$destination"
88
89
 
89
- CHECKOUT=$(bundle install > /dev/null)
90
+ bundle install > /dev/null
90
91
  echo -e "\033[1;32m - migrate\033[0m"
91
92
  bundle exec rails db:migrate:up VERSION=$MIGRATION
92
93
 
93
94
  renew_git
94
- git checkout main > /dev/null
95
+ git checkout $CURRENT_BRANCH > /dev/null
95
96
  done < <(sort -n "$TEMP_FILE")
96
97
 
97
98
  renew_git
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migrate-hack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Zillner
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-26 00:00:00.000000000 Z
10
+ date: 2025-03-28 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |+
13
13
  Ideal for deterministic pipelines, CI/CD, or containers that apply migrations step by step.
@@ -32,6 +32,7 @@ licenses:
32
32
  - MIT
33
33
  metadata:
34
34
  source_code_uri: https://github.com/omelao/migrate-hack
35
+ changelog_uri: https://github.com/omelao/migrate-hack/blob/main/CHANGELOG.md
35
36
  rdoc_options: []
36
37
  require_paths:
37
38
  - lib