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

feat: Add hex target for publishing elixir packages #449

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Jan 27, 2023

closes #409

@sl0thentr0py sl0thentr0py changed the title Add hex target for publishing elixir packages feat: Add hex target for publishing elixir packages Jan 27, 2023
@sl0thentr0py
Copy link
Member Author

Testing with dummy package published as 0.1.2

prepare

➜  test_elixir_package git:(main) ~/sentry/craft/dist/craft prepare 0.1.2 --log-level=debug
› craft 0.35.0-dev.0                                                                         17:36:29
› No environment file found in the home directory: /Users/neel/.craft.env                    17:36:29
› No environment file found in the configuration directory: /Users/neel/sentry/misc/test_elixir_package/.craft.env
› Not initializing Sentry SDK - no valid DSN found in environment or config files            17:36:29
› Configuration file found:  /Users/neel/sentry/misc/test_elixir_package/.craft.yml          17:36:29
› Parsing and validating the configuration file...                                           17:36:29
› No minimal version specified in the configuration, skpipping the check                     17:36:29
› Working directory: /Users/neel/sentry/misc/test_elixir_package                             17:36:29
› Default branch for the repo: main                                                          17:36:30
ℹ Checking the local repository status...                                                    17:36:30
› Repository status: {                                                                       17:36:30
    "not_added": [],
    "conflicted": [],
    "created": [],
    "deleted": [],
    "modified": [],
    "renamed": [],
    "files": [],
    "staged": [],
    "ahead": 0,
    "behind": 0,
    "current": "main",
    "tracking": "origin/main",
    "detached": false
}
ℹ Releasing version 0.1.2 from main                                                          17:36:30
ℹ Preparing to release the version: 0.1.2                                                    17:36:30
ℹ Created a new release branch: "release/0.1.2"                                              17:36:30
ℹ Switched to branch "release/0.1.2"                                                         17:36:30
› Changelog policy is set to "none", nothing to do.                                          17:36:30
ℹ Running the pre-release command...                                                         17:36:30
› Committing the release changes...                                                          17:36:30
ℹ Pushing the release branch "release/0.1.2"...                                              17:36:30
ℹ View diff at: https://github.com/sl0thentr0py/test_elixir_package/compare/release/0.1.2    17:36:32
✔ Done. Do not forget to run "craft publish" to publish the artifacts:   $ craft publish 0.1.2
ℹ Switching back to the default branch (main)...                                             17:36:32

➜  test_elixir_package git:(main) gd release/0.1.2 main
diff --git a/mix.exs b/mix.exs
index 4f594ce..06150c6 100644
--- a/mix.exs
+++ b/mix.exs
@@ -1,7 +1,7 @@
 defmodule NeelTestElixir.MixProject do
   use Mix.Project

-  @version "0.1.2"
+  @version "0.1.1"

publish

➜  test_elixir_package git:(main) ~/sentry/craft/dist/craft publish 0.1.2 --log-level=debug --no-status-check
› craft 0.35.0-dev.0                                                                         17:43:26
› No environment file found in the home directory: /Users/neel/.craft.env                    17:43:26
› No environment file found in the configuration directory: /Users/neel/sentry/misc/test_elixir_package/.craft.env
› Not initializing Sentry SDK - no valid DSN found in environment or config files            17:43:26
› Configuration file found:  /Users/neel/sentry/misc/test_elixir_package/.craft.yml          17:43:26
› Parsing and validating the configuration file...                                           17:43:26
› No minimal version specified in the configuration, skpipping the check                     17:43:26
› Catching Ctrl-C is disabled by default. See https://github.com/getsentry/craft/issues/21   17:43:26
ℹ Publishing version: "0.1.2"                                                                17:43:26
› Working directory: /Users/neel/sentry/misc/test_elixir_package                             17:43:26
› Checking out release branch release/0.1.2                                                  17:43:26
› Revision to publish:  db5ecdf91c8cfe2150fa990ea665d4cc4b62f6ae                             17:43:26
› Using "github" for status checks                                                           17:43:26
› Using "none" for artifacts                                                                 17:43:26

 WARN  Skipping build status checks for revision db5ecdf91c8cfe2150fa990ea665d4cc4b62f6ae    17:43:26

› Fetching artifact list for revision db5ecdf91c8cfe2150fa990ea665d4cc4b62f6ae.
ℹ No artifacts found for revision db5ecdf91c8cfe2150fa990ea665d4cc4b62f6ae

 WARN  No artifacts found for the revision.                                                  17:43:26

ℹ Looking for publish state file for 0.1.2...                                                17:43:26
› Creating target hex                                                                        17:43:26
ℹ Publishing to targets:                                                                     17:43:26
ℹ   - hex                                                                                    17:43:26
ℹ                                                                                            17:43:26
✔ Is everything OK? Type "yes" to proceed: … yes
ℹ                                                                                            17:43:28
ℹ =================================                                                          17:43:28
ℹ === Publishing to target: hex ===                                                          17:43:28
ℹ =================================                                                          17:43:28
ℹ Cloning sl0thentr0py/test_elixir_package into /var/folders/mk/x4jsgn953m76k2mk36z5n5z80000gn/T/craft-hex-4xGogb
ℹ Hex release complete                                                          [target/hex] 17:43:41
ℹ                                                                                            17:43:41
› Checking out merge target branch: main                                                     17:43:43
› Merging release/0.1.2 into: main                                                           17:43:43
› Deleting the release branch: release/0.1.2                                                 17:43:46
ℹ Removed the remote branch: "release/0.1.2"                                                 17:43:48
✔ Version 0.1.2 has been published!                                                          17:43:48
ℹ Not running the optional post-release command: 'scripts/post-release.sh' not found         17:43:48

@sl0thentr0py sl0thentr0py force-pushed the neel/elixir-hex branch 2 times, most recently from a168e30 to 50f4ed6 Compare January 27, 2023 17:05
@sl0thentr0py sl0thentr0py marked this pull request as ready for review January 27, 2023 17:06
@sl0thentr0py sl0thentr0py requested a review from tonyo January 27, 2023 17:06
Copy link
Contributor

@tonyo tonyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the only thing left is to update README.md 👍

@sl0thentr0py sl0thentr0py force-pushed the neel/elixir-hex branch 2 times, most recently from 8ae711c to a8a045b Compare January 27, 2023 17:48
Copy link
Contributor

@tonyo tonyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sl0thentr0py sl0thentr0py merged commit b330668 into master Jan 30, 2023
@sl0thentr0py sl0thentr0py deleted the neel/elixir-hex branch January 30, 2023 11:49
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

Successfully merging this pull request may close these issues.

Add target for Hex/Elixir
2 participants