degree9 / boot-semver Goto Github PK
View Code? Open in Web Editor NEWSemantic Versioning for boot projects.
License: MIT License
Semantic Versioning for boot projects.
License: MIT License
Hi @flyboarder ๐
I applied the following and getting an error:
$ boot version -y inc -z zero -r shapshot -d
Initial Project Version...: 0.1.2-1
Unable to resolve symbol: shapshot
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1031
boot.core/run-tasks core.clj: 1021
degree9.boot-semver.impl/version-impl/fn/fn impl.clj: 103
degree9.boot-semver.impl/update-version impl.clj: 59
degree9.boot-semver.impl/apply-version impl.clj: 18
...
clojure.core/merge-with core.clj: 2942
clojure.core/merge-with core.clj: 2950
clojure.core/reduce1 core.clj: 915
clojure.core/reduce1 core.clj: 925
clojure.core/merge-with/merge2 core.clj: 2957
clojure.core/reduce1 core.clj: 925
clojure.core/merge-with/merge-entry core.clj: 2954
degree9.boot-semver.impl/apply-version/fn impl.clj: 24
boot.App$Exit: 1
clojure.lang.ExceptionInfo: 1
line: 107
It happens without -d
as well BUT it does not happen in a build.boot
file. Also, -r git-sha1
works perfectly so there must be a problem with that particular symbol.
As usual thanks! The package has greatly improved over the time.
Affected versions: 1.5.0, 1.5.0-SNAPSHOT
In the mock project command boot version
causes degree9.boot_semver.impl$version_impl$fn__1053 cannot be cast to java.lang.CharSequence
exception.
Full stack trace:
Initial Project Version...: 0.0.4
java.lang.Thread.run Thread.java: 745
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1030
...
boot.core/construct-tasks core.clj: 992
clojure.core/apply core.clj: 646
...
boot.user/eval1467/fn/fn boot.user642982767582347347.clj: 25
clojure.core/apply core.clj: 646
...
degree9.boot-semver/eval1307/fn boot_semver.clj: 92
...
degree9.boot-semver.impl/eval985/fn impl.clj: 68
...
boot.cli/separate-cli-opts cli.clj: 212
...
boot.from.clojure.tools.cli/parse-opts cli.clj: 499
...
boot.from.clojure.tools.cli/tokenize-args cli.clj: 27
clojure.core/re-seq core.clj: 4692
clojure.core/re-matcher core.clj: 4667
java.lang.ClassCastException: degree9.boot_semver.impl$version_impl$fn__1053 cannot be cast to java.lang.CharSequence
clojure.lang.ExceptionInfo: degree9.boot_semver.impl$version_impl$fn__1053 cannot be cast to java.lang.CharSequence
file: "/tmp/boot.user642982767582347347.clj"
line: 33
Maybe out of scope: it would be nice to use git to generate a list of commits that went into the release. This could be prepended to a changes.md or similar.
Given that this creates a dirty git state it will lead to similar problems as in #17. Maybe in that case users would have a prep-release
type of task instead of a task that does all release steps.
It would be useful if degree9.boot-semver/get-version
method tries to find outcome of :generate
class and read version from that before reading version.properties
file.
It allows to use the method with :develop true
task option.
Hi there, I am trying to contribute the perun
deployment and using this nice little project ๐
I am trying to use the push-*
tasks by doing:
export CLOJARS_USER=
export CLOJARS_PASS=
boot version build-jar push-snapshot
(same for release)
However, when I do that I receive:
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 2030
boot.core/boot/fn core.clj: 1032
boot.core/run-tasks core.clj: 1022
degree9.boot-semver.impl/eval4554/fn/fn/fn impl.clj: 157
boot.task.built-in/fn/fn/fn/fn built_in.clj: 394
degree9.boot-semver.impl/eval4604/fn/fn/fn impl.clj: 207
java.lang.Exception: missing jar file or repo not found
clojure.lang.ExceptionInfo: missing jar file or repo not found
It actually works when no environment are export
ed it seems.
I have debugged the code and it seems like a new repo version-clojars
is created with the read credentials but then it is not clear to me if it is actually used when pushing.
[["clojars" {:url "https://repo.clojars.org/"}]
["maven-central" {:url "https://repo1.maven.org/maven2"}]
["version-clojars"
{:url "https://clojars.org/repo/", :username "ars", :password "ars"}]]
Am I missing something about usage here?
I noticed that the functions used from clojurewerkz/propertied
are easily replaceable with custom java/clojure code and I was wondering whether it might make sense to get rid of it, for example in my own code I have a:
(defn map->properties
"Create a java.util.Properties out of a map"
^Properties [m]
(reduce-kv (fn [props k v] (doto props (.setProperties props (str k) (str v))))
(Properties.)
m))
That we can use instead.
I'll explain why this bothers me as well, that library imports transitive dependencies that are conflicting with the one I have in my build.boot
and generating warnings :D (I know I can use :exclusions
but if we can use a simple helper function why not doing it instead?)
Would you accept a PR with this change?
When using the version change in combination with the push tasks ensure-clean
option you can't use. Both in the same boot invocation. To avoid this it might be handy to commit the version properties change as part of the version task.
If I understood correctly with :build
I am supposed to get rid of the SNAPSHOT
part right?
When I try: boot version -b inc
I get:
clojure.lang.ExceptionInfo: java.lang.NullPointerException
data: {:file "/tmp/boot.user7119306331923366147.clj", :line 45}
java.util.concurrent.ExecutionException: java.lang.NullPointerException
java.lang.NullPointerException:
...
clojure.core/inc core.clj: 892
...
boot-semver.core/update-version/fn core.clj: 53
clojure.core/merge-with/merge-entry core.clj: 2932
clojure.core/reduce1 core.clj: 909
clojure.core/merge-with/merge2 core.clj: 2935
clojure.core/reduce1 core.clj: 909
clojure.core/reduce1 core.clj: 900
clojure.core/merge-with core.clj: 2936
...
boot-semver.core/update-version core.clj: 53
boot-semver.core/eval2392/fn core.clj: 84
...
clojure.core/apply core.clj: 630
boot.core/construct-tasks core.clj: 760
...
clojure.core/apply core.clj: 630
boot.core/boot/fn core.clj: 805
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
In the mock project I attached previous time when I remove :pre-release
setting boot still produces jar with the pre-release postfix. Also for example when I change patch
setting to 'two the version become 0.0.2-SNAPSHOT. To have it working I need to remove version.properties
file.
I am not sure if that is intentional or not. If so how should I make release commit?
I have the following in my build.boot
(def +version+ (get-version))
(bootlaces! +version+)
Every time I trigger boot version -r empty
I receive:
clojure.lang.ExceptionInfo: clojure.lang.PersistentList cannot be cast to clojure.lang.Associative
data: {:file "/tmp/boot.user5858159442537412725.clj", :line 47}
java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Associative
...
clojure.core/assoc core.clj: 191
clojure.core/assoc-in core.clj: 5910
boot-semver.core/eval1425/fn/opt--auto-- core.clj: 89
boot-semver.core/eval1425/fn core.clj: 88
...
clojure.core/apply core.clj: 630
boot.core/construct-tasks core.clj: 893
...
clojure.core/apply core.clj: 630
boot.core/boot/fn core.clj: 938
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
Commenting out the bootlaces!
call solves the problem.
Do you why this happens? I will debug as well.
Intended features for a 'future' release.
Affected version 1.6.0
Full debug log:
Initial Project Version...: 0.2.0
Generating Version Namespace...: rdf4j.version
Current Build Version...: 0.2.1-SNAPSHOT
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1029
boot.core/run-tasks core.clj: 1019
degree9.boot-semver.impl/version-impl/fn/fn impl.clj: 100
degree9.boot-semver.impl/eval1026/fn/fn/fn impl.clj: 93
...
boot.util/info util.clj: 84
boot.util/print* util.clj: 57
clojure.core/apply core.clj: 646
...
clojure.core/format core.clj: 5527
clojure.core/format core.clj: 5533
java.lang.String.format String.java: 2940
java.util.Formatter.format Formatter.java: 2455
java.util.Formatter.format Formatter.java: 2519
java.util.MissingFormatArgumentException: Format specifier '%s'
formatSpecifier: "%s"
clojure.lang.ExceptionInfo: Format specifier '%s'
file: "/tmp/boot.user4367583297836020968.clj"
line: 37
In line 37 of the boot script I have:
(clojure.core/let [boot?__1744__auto__ true] (clojure.core/if-not boot?__1744__auto__ (clojure.core/when-let [main__1745__auto__ (clojure.core/resolve (quote boot.user/-main))] (main__1745__auto__ "develop" "build-standalone")) (boot.core/boot "develop" "build-standalone")))
Update generated version ns to have .cljc
ext instead, this will allow the file to be found by shadow-cljs and boot-shadow.
What is a mock example to build and deploy snapshot
pre-release jar.
The mock project does not work with compilation workflow boot develop build-sources
.
I expect jar file: target/mock-issue-55-0.0.3-SNAPHOT-sources.jar
but I have target/mock-issue-55-0.0.3-sources.jar
instead.
The mock project contains /target
directory.
I found the final semver file is not kept within final jar - it is save in the project root directory and thus is not attached during building process. Do I miss another task or that is a feature?
I have a task that outputs documentation and it needs the version-number. ATM I have to include boot.semver.impl
namespace for the get-version
function. Would it not make sense to expose that function along with the rest of the public api?
Affected version 1.6.0
.
I just wanted keep version and :generate
encoded in task-options!
clause but have error.
(task-options!
version {:minor 'two :patch 'zero :generate 'rdf4j.version}
pom {:project (get-env :project)}
aot {:all true})
After boot version
I have error:
Initial Project Version...: 0.2.0
Generating Version Namespace...: rdf4j.version
Current Build Version...: 0.2.0
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 1938
boot.core/boot/fn core.clj: 1029
boot.core/run-tasks core.clj: 1019
degree9.boot-semver.impl/version-impl/fn/fn impl.clj: 100
degree9.boot-semver.impl/eval986/fn/fn/fn impl.clj: 84
...
clojure.lang.ArityException: Wrong number of args (3) passed to: impl/eval986/fn--987/fn--992/fn--993/spit-ns--994
clojure.lang.ExceptionInfo: Wrong number of args (3) passed to: impl/eval986/fn--987/fn--992/fn--993/spit-ns--994
file: "/tmp/boot.user1599353312149023011.clj"
line: 35
fs
metadata.So version task could also add version to the file-system metadata.
The generated version namespace is not available in the workflow classpath probably because is added into resources
rather than sources
.
I need to add a singe variable with version number as a string.
How can I import it into boot-semer
? I am able to parse it into a map with string values: {:major "0" :minor "2" ...}
. But that is not useful for version
task from boot-semver
. Do exist any workaround for that?
Hello again ๐
Given that I see folks (and myself) using semver-short-git
more than semver-git
, what about renaming them?
I propose:
semver-short-git
-> semver-git
semver-git
-> semver-long-git
And now that we are at it, we could rename them in -commit
because I saw for instance that you want to read from a tag
as well and the -git
part could lose significance. The latter proposal of course depends on the future features so I might be missing something here.
Thank you!
Hello @flyboarder
I tried your example in #21 and got (initial was `0.1.1-SNAPSHOT):
(Correct)
$ boot version -r empty -b one
Add version.properties...
Version in version.properties ...: 0.1.1-SNAPSHOT
Current Build Version ...: 0.1.1+1
Updating Project Version...: 0.1.1-SNAPSHOT->0.1.1+1
$ boot version -b inc
Add version.properties...
clojure.lang.ExceptionInfo: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
data: {:file "/tmp/boot.user8680243058399234045.clj", :line 51}
java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
...
clojure.core/inc core.clj: 892
...
boot-semver.core/update-version/fn core.clj: 55
clojure.core/merge-with/merge-entry core.clj: 2932
clojure.core/reduce1 core.clj: 909
clojure.core/merge-with/merge2 core.clj: 2935
clojure.core/reduce1 core.clj: 909
clojure.core/reduce1 core.clj: 900
clojure.core/merge-with core.clj: 2936
...
boot-semver.core/update-version core.clj: 54
boot-semver.core/eval2162/fn core.clj: 87
...
clojure.core/apply core.clj: 630
boot.core/construct-tasks core.clj: 760
...
clojure.core/apply core.clj: 630
boot.core/boot/fn core.clj: 805
clojure.core/binding-conveyor-fn/fn core.clj: 1916
...
I think I found some bug maybe, or maybe I cannot use it like this...I don't have too much time now to investigate:
$ boot version -n -b semver-date-time
clojure.lang.ExceptionInfo: clojure.lang.ArityException: Wrong number of args (0) passed to: core/semver-date
data: {:file "/tmp/boot.user7467330014828633277.clj", :line 31}
java.util.concurrent.ExecutionException: clojure.lang.ArityException: Wrong number of args (0) passed to: core/semver-date
clojure.lang.ArityException: Wrong number of args (0) passed to: core/semver-date
...
boot-semver.core/semver-date-time core.clj: 48
...
boot-semver.core/update-version/fn core.clj: 53
clojure.core/merge-with/merge-entry core.clj: 2932
clojure.core/reduce1 core.clj: 909
clojure.core/merge-with/merge2 core.clj: 2935
clojure.core/reduce1 core.clj: 909
clojure.core/reduce1 core.clj: 900
clojure.core/merge-with core.clj: 2936
...
boot-semver.core/update-version core.clj: 53
boot-semver.core/eval2449/fn core.clj: 84
...
clojure.core/apply core.clj: 630
boot.core/construct-tasks core.clj: 760
...
clojure.core/apply core.clj: 630
boot.core/boot/fn core.clj: 805
clojure.core/binding-conveyor-fn/fn core.clj: 1916
Running more than once boot version
... target
crates some weird tree target/target/..../target/version.properties
.
After a few runs I have:
target/
โโโ logback.xml
โโโ target
โย ย โโโ target
โย ย โย ย โโโ target
โย ย โย ย โย ย โโโ target
โย ย โย ย โย ย โย ย โโโ version.properties
โย ย โย ย โย ย โโโ version.properties
โย ย โย ย โโโ version.properties
โย ย โโโ version.properties
โโโ version.properties
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.