applied-science / deps-library

Publish deps.edn libraries to Clojars
Eclipse Public License 2.0
52 stars 3 forks source link

can I disable the behavior of adding tags #2

Closed tiye closed 4 years ago

tiye commented 4 years ago

Auto tagging could be useful sometimes. But I'm considering it's not good enough to be bound to deploying. People might just want to deploy that package. Anyone got his/her habit...

Personally I deploy packages with GitHub Actions at current. There's network issues in Shanghai and publishing to Clojars can be really slow and unstable sometimes. It's much more reliable to deploy packages from the servers of GitHub. Adding tags in running GitHub actions does no help to me this such case.

mhuebert commented 4 years ago

OK, I've added a flag for this purpose in 0.3.1 (note: the coordinate for this library has changed to appliedscience/deps-library)

Command line: --skip-tag

release.edn:

{:skip-tag true
 ...}
tiye commented 4 years ago

Suspicious... I got it running on GitHub Actions with tag 0.0.7-a2-build1:

image

I thought it's already turned off, and it's 0.3.1 for sure:

https://github.com/mvc-works/skir/blob/0.0.7-a2-build1/release.edn#L4

https://github.com/mvc-works/skir/blob/0.0.7-a2-build1/deps.edn#L6

tiye commented 4 years ago

running locally:

=>> yarn deploy
yarn run v1.19.1
$ clj -A:release --prefix=''
Downloading: appliedscience/deps-library/0.3.1/deps-library-0.3.1.pom from https://repo.clojars.org/
Downloading: appliedscience/deps-library/0.3.1/deps-library-0.3.1.jar from https://repo.clojars.org/
TAG... 0.0.7-a2
20-03-05 17:26:32 ChenYongs-MacBook.local ERROR [garamond.git:15] - Command 'git tag --annotate --message Automatically-generated tag from garamond 0.0.7-a2' returned 128!
20-03-05 17:26:33 ChenYongs-MacBook.local ERROR [garamond.git:19] - stderr: fatal: tag '0.0.7-a2' already exists
:tag-error {:code 128, :message nil}
 - tag already exists (0.0.7-a2), continuing
POM... mvc-works/skir {:mvn/version "0.0.7-a2"}
JAR... target/project.jar (thin)
Building thin jar: target/project.jar
Processing pom.xml for {mvc-works/skir {:mvn/version "0.0.7-a2"}}
DEPLOY... clojars

Deploying mvc-works/skir-0.0.7-a2 to clojars as jiyinyiyong

=>> cat release.edn
{:version "0.0.7-a2"
 :group-id "mvc-works"
 :artifact-id "skir"
 :skip-tag true
 :scm-url "https://github.com/mvc-works/skir"}
mhuebert commented 4 years ago

Thanks for the debugging info. It was a bug in defaults merging - should work now in 0.3.2

mhuebert commented 4 years ago

also: --prefix is only used for the git tag. If you are not using tags you should be able to skip the --prefix '' option. Added a note about this to the docs.

tiye commented 4 years ago

Thanks. Now it's working as expected.