Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can someone suggest what i'm missing ? - Error [ Message: For input string: ""] #93

Open
Keshapally opened this issue Oct 19, 2023 · 2 comments

Comments

@Keshapally
Copy link

Keshapally commented Oct 19, 2023

Starting process...
Received context {:input/release-name Release <RELEASE_TAG>, :github/api-url https://api.github.com/, :github/output /github/file_commands/set_output_7dbf11af-bd06-4c78-87b2-ed0d35c1f59d, :bump-version-scheme minor, :input/tag-prefix ATOM_V, :input/max-commits 100, :token ***, :input/release-body , :input/use-github-release-notes false, :repo XXXXXXXX , :dry-run false, :sha d9eb89a531XXXXXXXXX9c2f7a454ad63[16](https://github.com/XXXXXXXXXXXX/actions/runs/6572617004/job/17854069715#step:3:17)c8e}
Fetching related data...
Generating release...
----- Error --------------------------------------------------------------------
Type:     java.lang.NumberFormatException
Message:  For input string: ""
Location: /var/src/release-on-push-action/src/release_on_push_action/core.clj:105:[29](https://github.com/XXXXXXXXXXX/actions/runs/6572617004/job/17854069715#step:3:30)

----- Context ------------------------------------------------------------------
101: 
102: (defn generate-new-release-data [context related-data]
103:   (let [bump-version-scheme (bump-version-scheme context related-data)
104:         current-version     (get-tagged-version (:latest-release related-data))
105:         next-version        (semver-bump current-version bump-version-scheme)
                                 ^--- For input string: ""
106:         base-commit         (get-in related-data [:latest-release-commit :sha])
107:         tag-name            (str (:input/tag-prefix context) next-version)
108: 
109:         ;; this is a lazy sequence
110:         commits-since-last-release (->> (github/list-commits-to-base context base-commit)
@DasBen
Copy link

DasBen commented Nov 6, 2023

Maybe a bit too late, but this action is pretty much dead. I just checked my PR for a fix and there is still nothing happening here.

Based on the error message "core.clj:105" I would say its this line: https://github.com/rymndhng/release-on-push-action/blob/master/src/release_on_push_action/core.clj#L105C9-L105C21

That means "next-version" as input is missing. Make sure this is set.

If you want more help, please also post your call of this action.

@acnicholls
Copy link

i had this exact error, my latest release was v1 with a tag exactly that. and I had 2 other tags v0.1.0-string and another like it, from earlier commits/releases that I had done manually

on a hunch because of next-version (**semver-bump** current-version bump-version-scheme), i went and added a semver compatible tag on the same commit that was my "latest' release.

it tag -a v1.0.0.0 <commit hash of "latest" release tag> -m "for semver"

and then I re-ran my workflow with the "re-run failed jobs" button and it was successful with the bump set to minor.
I got a release of v1.1.0 with all the trimmings. so delightful!

        with:
          bump_version_scheme: minor
          tag_prefix: v
          use_github_release_notes: true
          release_name: "Release <RELEASE_TAG>"
          release_body: "Bug fixes and features for stability of the application."

these are the with options I'm using, nothing really special...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants