Skip to content

Commit 4254295

Browse files
committed
chore: use replace for local mods
1 parent acc35fb commit 4254295

File tree

6 files changed

+75
-1
lines changed

6 files changed

+75
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ release-plan: ##@release Preview version rewrites and tags without changing file
8888
test -n "$(RUN_ARGS)" || (echo "usage: make release-plan <version> [-- --exclude <dir>]" && exit 1)
8989
bash scripts/release-all-modules.sh $(RUN_ARGS) --dry-run --allow-dirty
9090

91-
release-modules: ##@release Rewrite sibling versions, commit, and push tags: make release-modules v0.1.0 [-- --remote <name>|--exclude <dir>|--skip-existing]
91+
release-modules: ##@release Rewrite sibling versions, commit, push the branch, and push tags: make release-modules v0.1.0 [-- --remote <name>|--exclude <dir>|--skip-existing]
9292
test -n "$(RUN_ARGS)" || (echo "usage: make release-modules <version> [-- --remote <name>|--exclude <dir>|--skip-existing]" && exit 1)
9393
bash scripts/release-all-modules.sh $(RUN_ARGS) --commit --push --allow-dirty

docs/bench/go.mod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@ require (
2020
)
2121

2222
replace github.com/goforj/storage/storagetest => ../../storagetest
23+
24+
replace github.com/goforj/storage => ../..
25+
26+
replace github.com/goforj/storage/driver/ftpstorage => ../../driver/ftpstorage
27+
28+
replace github.com/goforj/storage/driver/gcsstorage => ../../driver/gcsstorage
29+
30+
replace github.com/goforj/storage/driver/localstorage => ../../driver/localstorage
31+
32+
replace github.com/goforj/storage/driver/memorystorage => ../../driver/memorystorage
33+
34+
replace github.com/goforj/storage/driver/rclonestorage => ../../driver/rclonestorage
35+
36+
replace github.com/goforj/storage/driver/redisstorage => ../../driver/redisstorage
37+
38+
replace github.com/goforj/storage/driver/s3storage => ../../driver/s3storage
39+
40+
replace github.com/goforj/storage/driver/sftpstorage => ../../driver/sftpstorage

examples/go.mod

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ require (
1515
github.com/goforj/storage/driver/sftpstorage v0.2.3
1616
)
1717

18+
replace github.com/goforj/storage => ..
19+
20+
replace github.com/goforj/storage/driver/dropboxstorage => ../driver/dropboxstorage
21+
22+
replace github.com/goforj/storage/driver/ftpstorage => ../driver/ftpstorage
23+
24+
replace github.com/goforj/storage/driver/gcsstorage => ../driver/gcsstorage
25+
26+
replace github.com/goforj/storage/driver/localstorage => ../driver/localstorage
27+
28+
replace github.com/goforj/storage/driver/memorystorage => ../driver/memorystorage
29+
30+
replace github.com/goforj/storage/driver/rclonestorage => ../driver/rclonestorage
31+
32+
replace github.com/goforj/storage/driver/redisstorage => ../driver/redisstorage
33+
34+
replace github.com/goforj/storage/driver/s3storage => ../driver/s3storage
35+
36+
replace github.com/goforj/storage/driver/sftpstorage => ../driver/sftpstorage
37+
1838
require (
1939
cel.dev/expr v0.25.1 // indirect
2040
cloud.google.com/go v0.123.0 // indirect

go.work.sum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,14 @@ github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198 h1:FSii2UQeSLngl3jFo
671671
github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198/go.mod h1:DTh/Y2+NbnOVVoypCCQrovMPDKUGp4yZpSbWg5D0XIM=
672672
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
673673
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
674+
github.com/goforj/storage/driver/dropboxstorage v0.2.3/go.mod h1:d52NV3FozYt0TTunHMgyadUG/xgw8K8t+sjFpI2ulPM=
675+
github.com/goforj/storage/driver/ftpstorage v0.2.3/go.mod h1:339dwqXPfwz3NJuTXQf2RRtOfy07EU2ad2lvEFCqWzk=
676+
github.com/goforj/storage/driver/gcsstorage v0.2.3/go.mod h1:D30oJHBFcX33Z+OHn+M5ukH0+IM/y9pt4OnYeyf/PWY=
677+
github.com/goforj/storage/driver/localstorage v0.2.3/go.mod h1:D2FSaELkHYH0vV3fMI5Swl5gE4mYMxrfzqW+gkxxFig=
678+
github.com/goforj/storage/driver/rclonestorage v0.2.3/go.mod h1:ce0vzKKlh3SKphpfIgSHom2sZn3PutAtGckmLpLrG0w=
679+
github.com/goforj/storage/driver/redisstorage v0.2.3/go.mod h1:jSeip9LEGFvXs81KqnT/CdqtnPc1knYPmLrE3MnIFsc=
680+
github.com/goforj/storage/driver/s3storage v0.2.3/go.mod h1:QKdQIlmNQVZ3hXMNFQjYqyCLMuSZGTpIKqFB3kksi+c=
681+
github.com/goforj/storage/driver/sftpstorage v0.2.3/go.mod h1:vf155AuerYKCeobLNMsFDq26AsehJfT1BgUWIO2luK4=
674682
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
675683
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
676684
github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I=

integration/go.mod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ require (
2020

2121
replace github.com/goforj/storage/storagetest => ../storagetest
2222

23+
replace github.com/goforj/storage => ..
24+
25+
replace github.com/goforj/storage/driver/ftpstorage => ../driver/ftpstorage
26+
27+
replace github.com/goforj/storage/driver/gcsstorage => ../driver/gcsstorage
28+
29+
replace github.com/goforj/storage/driver/localstorage => ../driver/localstorage
30+
31+
replace github.com/goforj/storage/driver/memorystorage => ../driver/memorystorage
32+
33+
replace github.com/goforj/storage/driver/rclonestorage => ../driver/rclonestorage
34+
35+
replace github.com/goforj/storage/driver/redisstorage => ../driver/redisstorage
36+
37+
replace github.com/goforj/storage/driver/s3storage => ../driver/s3storage
38+
39+
replace github.com/goforj/storage/driver/sftpstorage => ../driver/sftpstorage
40+
2341
require (
2442
cel.dev/expr v0.25.1 // indirect
2543
cloud.google.com/go v0.123.0 // indirect

scripts/release-all-modules.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Behavior:
1616
- Rewrites intra-repo module requirements to the target version
1717
- Verifies published driver manifests
1818
- Optionally creates a release commit
19+
- When --push is set, pushes the current branch before pushing tags
1920
- Tags the resulting commit using scripts/tag-all-modules.sh
2021
2122
Notes:
@@ -302,6 +303,15 @@ else
302303
fi
303304
fi
304305

306+
if [[ "$push" -eq 1 ]]; then
307+
current_branch="$(git rev-parse --abbrev-ref HEAD)"
308+
if [[ "$current_branch" == "HEAD" ]]; then
309+
echo "error: cannot push release commit from detached HEAD" >&2
310+
exit 1
311+
fi
312+
git push "$remote" "$current_branch"
313+
fi
314+
305315
tag_args=("$version")
306316
if [[ "$push" -eq 1 ]]; then
307317
tag_args+=("--push")

0 commit comments

Comments
 (0)