File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,17 @@ function publish(branch::AbstractString, prbranch::AbstractString="")
73
73
m != = nothing && occursin (Base. VERSION_REGEX, m. captures[2 ]) || continue
74
74
pkg, ver = m. captures; ver = VersionNumber (ver)
75
75
sha1 = readchomp (joinpath (metapath,path))
76
- old = LibGit2. content (LibGit2. GitBlob (repo, " origin/$branch :$path " ))
77
- old != = nothing && old != sha1 && throw (Pkg. PkgError (" $pkg v$ver SHA1 changed in METADATA – refusing to publish" ))
76
+ try
77
+ old = LibGit2. content (LibGit2. GitBlob (repo, " origin/$branch :$path " ))
78
+ if old != sha1
79
+ throw (Pkg. PkgError (" $pkg v$ver SHA1 changed in METADATA – refusing to publish" ))
80
+ end
81
+ catch e
82
+ if ! (e isa LibGit2. GitError && e. code == LibGit2. Error. ENOTFOUND)
83
+ rethrow (e)
84
+ end
85
+ end
86
+
78
87
with (LibGit2. GitRepo, PkgDev. dir (pkg)) do pkg_repo
79
88
tag_name = " v$ver "
80
89
tag_commit = LibGit2. revparseid (pkg_repo, " $(tag_name) ^{commit}" )
You can’t perform that action at this time.
0 commit comments