src/main/java/com/rm5248/debianpbuilder/DebianPbuilder.java
private void updateChangelog( Launcher launcher, FilePath changelog, String packageName, String snapshotVersion ) throws IOException, InterruptedException {
        Scanner scan = new Scanner( changelog.read(), "UTF-8" );
        StringBuilder strBuild = new StringBuilder();
        String debEmail = "Debian Pbuilder Autobuilder <" +
                getEmail(launcher) + ">";
        java.time.ZonedDateTime now = java.time.ZonedDateTime.now();
        DateTimeFormatter dtFormat = DateTimeFormatter.ofPattern( "ccc, dd MMM YYYY HH:mm:ss Z");

        strBuild.append( packageName );
        strBuild.append( " (" );
        strBuild.append( snapshotVersion );
        strBuild.append( ") UNRELEASED; urgency=low" );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );

        strBuild.append( "  ** SNAPSHOT Build **" );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );

        strBuild.append( " -- " );
        strBuild.append( debEmail );
        strBuild.append( "  " );
        strBuild.append( now.format( dtFormat ) );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );

        while( scan.hasNextLine() ){
            strBuild.append( scan.nextLine() );
            strBuild.append( System.lineSeparator() );
        }

        scan.close();

        Writer w = new OutputStreamWriter( changelog.write(), "UTF-8" );
        w.write( strBuild.toString() );
        w.close();
    }
/**
     * Force update the changelog.  Don't use any of the debian scripts to update,
     * since we just want new stuff + old.  This is what jenkins-debian-glue does with SVN snapshots.
     *
     */
Force update the changelog.  Don't use any of the debian scripts to update,
since we just want new stuff + old.  This is what jenkins-debian-glue does with SVN snapshots.
Force update the changelog . Don ' t use any of the debian scripts to update since we just want new stuff + old . This is what jenkins - debian - glue does with SVN snapshots .
private void updateChangelog( Launcher launcher, FilePath changelog, String packageName, String snapshotVersion ) throws IOException, InterruptedException {
        Scanner scan = new Scanner( changelog.read(), "UTF-8" );
        StringBuilder strBuild = new StringBuilder();
        String debEmail = "Debian Pbuilder Autobuilder <" +
                getEmail(launcher) + ">";
        java.time.ZonedDateTime now = java.time.ZonedDateTime.now();
        DateTimeFormatter dtFormat = DateTimeFormatter.ofPattern( "ccc, dd MMM YYYY HH:mm:ss Z");
        strBuild.append( packageName );
        strBuild.append( " (" );
        strBuild.append( snapshotVersion );
        strBuild.append( ") UNRELEASED; urgency=low" );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );
        strBuild.append( "  ** SNAPSHOT Build **" );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );
        strBuild.append( " -- " );
        strBuild.append( debEmail );
        strBuild.append( "  " );
        strBuild.append( now.format( dtFormat ) );
        strBuild.append( System.lineSeparator() );
        strBuild.append( System.lineSeparator() );
        while( scan.hasNextLine() ){
            strBuild.append( scan.nextLine() );
            strBuild.append( System.lineSeparator() );
        }
        scan.close();
        Writer w = new OutputStreamWriter( changelog.write(), "UTF-8" );
        w.write( strBuild.toString() );
        w.close();
    }
private void updateChangelog ( Launcher launcher , FilePath changelog , String packageName , String snapshotVersion ) throws IOException , InterruptedException { Scanner scan = new Scanner ( changelog . read ( ) , "UTF-8" ) ; StringBuilder strBuild = new StringBuilder ( ) ; String debEmail = "Debian Pbuilder Autobuilder <" + getEmail ( launcher ) + ">" ; java . time . ZonedDateTime now = java . time . ZonedDateTime . now ( ) ; DateTimeFormatter dtFormat = DateTimeFormatter . ofPattern ( "ccc, dd MMM YYYY HH:mm:ss Z" ) ; strBuild . append ( packageName ) ; strBuild . append ( " (" ) ; strBuild . append ( snapshotVersion ) ; strBuild . append ( ") UNRELEASED; urgency=low" ) ; strBuild . append ( System . lineSeparator ( ) ) ; strBuild . append ( System . lineSeparator ( ) ) ; strBuild . append ( "  ** SNAPSHOT Build **" ) ; strBuild . append ( System . lineSeparator ( ) ) ; strBuild . append ( System . lineSeparator ( ) ) ; strBuild . append ( " -- " ) ; strBuild . append ( debEmail ) ; strBuild . append ( "  " ) ; strBuild . append ( now . format ( dtFormat ) ) ; strBuild . append ( System . lineSeparator ( ) ) ; strBuild . append ( System . lineSeparator ( ) ) ; while ( scan . hasNextLine ( ) ) { strBuild . append ( scan . nextLine ( ) ) ; strBuild . append ( System . lineSeparator ( ) ) ; } scan . close ( ) ; Writer w = new OutputStreamWriter ( changelog . write ( ) , "UTF-8" ) ; w . write ( strBuild . toString ( ) ) ; w . close ( ) ; }
Force update the changelog.
Force update the changelog .