Maven版本:提交前准备TAG

时间:2018-10-23 15:12:26

标签: java maven continuous-integration

有什么方法可以在增量之前用 cts = new CancellationTokenSource(); try { await Task.Run(() => { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); var Command = connection.CreateCommand(); cts.Token.Register(() => { Command.Cancel(); //Command.Transaction.Rollback(); }); Command.CommandText = some sql query; Command.Transaction = connection.BeginTransaction(); try { Command.ExecuteNonQuery(); //... and May more transactions, long running job. // User invokes cancel request (Scenario #1). } catch (Exception ex) { Console.WriteLine(ex.InnerException); } // This Commit is expected to take long time. // User invokes cancel request while stepped into this call and hasn't got out yet. (Scenario #2). Command.Transaction.Commit(); } }); } catch (Exception ex) { // Maybe rollback is necessary here if SqlCommand.Cancel is not availble at this point? // User invokes cancel request (Scenario #3). } private void UserRequestsCancel(object sender, EventArgs e) { cts.Cancel(); } sortRotate() { const items = this.state.moderation_list.slice(); items.unshift(items.pop()) this.setState({ moderation_list: items }); } renderArticles() { return this.state.moderation_list.map( (item, i) => { return ( <div key={item.id} view="list" {...item} className={`item ${item.time <= this.props.video_reducer.player_current_time && this.props.video_reducer.player_current_time <= item.stopTime ? "active":""}`}> <div className="top"> <div className="time"> {this.getStandardTimeFormat(item.time)}- {this.getStandardTimeFormat(item.stopTime)}</div> <div className="action-icons"> <div className="icon active"> <span className="fa fa-check"></span> </div> <div className="icon"> <span className="fa fa-times"></span> </div> </div> </div> <div className="main-box">{item.tagname}</div> </div> ); });} render() { return ( <div> <section className="sidebar-flex"> <Sidebar/> <div className="main-flex"> <VideoSection /> <div className="right compliance-fs"> <div className="back-btn" onClick={this.toVideoPage.bind(this)}> <span className="fa fa-compress"></span> </div> <div className="heading-tabs"> <div className="title">Tagging</div> <div className="tabs" onClick={this.sortRotate.bind(this)}> <div className="item active" >Compliance</div> </div> </div> <div className="compliance-column"> <div className="gradient-box"></div> <div className="item-list-container"> <FlipMove staggerDurationBy={30} duration={1000} enterAnimation={this.state.enterLeaveAnimation} leaveAnimation={this.state.enterLeaveAnimation} typeName="ul" > {this.renderArticles()} </FlipMove> </div> </div> </div> </div> </section> </div> ); } } 编写代码?我不需要事后标记-只需先标记即可。 我在这里和错误报告中检查了几个线程,但没有发现任何结论。我的发布非常简单。现在,我的版本为L*a*b*,我希望它成为标签(TAG)。这可能吗?我看到很多关于此功能被破坏的报告。

POM

1 个答案:

答案 0 :(得分:1)

我认为您需要了解发行插件的用途。

版本:准备:

1) run build, with tests
2) check no snapshot dependencies
3) remove snapshot from version (4.0.0 in your case)
4) tag this version in source control (4.0.0 in your case)
5) increment version to next snapshot (4.0.1-SNAPSHOT in your case)

版本:执行

1) checkout tag
2) build with tests
3) deploy released version to repository (4.0.0 in your case)

您将在存储库中拥有一个不可变的二进制文件,并在版本4.0.0处具有匹配的源代码标签。