Skip to content

Commit ded07ab

Browse files
david-aimsunnlohmann
authored andcommitted
Support release tag (#36)
1 parent 1f38585 commit ded07ab

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

include/crow/crow.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ class crow
161161
*/
162162
const json& get_context() const;
163163

164+
/*!
165+
* @brief set the code release id
166+
*
167+
* @param[in] release release id to add to the main context
168+
*
169+
* @since 0.0.7
170+
*/
171+
void set_release(const std::string& release);
172+
164173
/*!
165174
* @brief add elements to the "user" context for future events
166175
*

src/crow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ const json& crow::get_context() const
237237
return m_payload;
238238
}
239239

240+
void crow::set_release( const std::string & release )
241+
{
242+
std::lock_guard<std::mutex> lock(m_payload_mutex);
243+
m_payload["release"] = release;
244+
}
245+
240246
void crow::add_user_context(const json& data)
241247
{
242248
std::lock_guard<std::mutex> lock(m_payload_mutex);

0 commit comments

Comments
 (0)