
946 S.W.2d 79 (1997)
Ex parte Terry HARRIS.
No. 72778.
Court of Criminal Appeals of Texas.
June 4, 1997.
*80 John Bennett, Staff Counsel, Huntsville, for appellant.
Tim Curry, District Attorney, Fort Worth, Matthew Paul, State's Atty., Austin, for State.

OPINION
PER CURIAM.
This is a post-conviction application for writ of habeas corpus filed pursuant to the provisions of Article 11.07, V.A.C.C.P. Applicant was convicted of the state jail felony of delivery of less than one gram of cocaine, and the court sentenced him to two years in prison, probated for five years. As a condition of probation, the court ordered Applicant serve 30 days in the county jail. Some eight months later, pursuant to the State's motion to revoke, the court revoked Applicant's probation and sentenced him to two years in prison. Appeal was dismissed on Applicant's own motion. Harris v. State, No. 02-95-00429-CR (Tex.App.Fort Worth, opinion delivered February 15, 1996, no pet.).
Applicant contends that he has not been given credit on his sentence for (a) the time he was incarcerated prior to his plea, (b) the time he served as a condition of probation, and (c) the time he was incarcerated pursuant to the State's motion to revoke probation. He argues that, although he would not normally be entitled to these time periods pursuant to Article 42.12, Section 15(h)(2), V.A.C.C.P., and Article 42.03, Section 2, V.A.C.C.P., he is entitled to the credit in this case because he was sentenced to the maximum sentence provided by law. The State agrees, and the trial court recommends granting relief.
We initially remanded this application to the trial court to determine Applicant's indigency status. The trial court has now found that Applicant was financially unable to make bond during the period of his original arrest through the date of his guilty plea.
Applicant was arrested on January 17, 1995, and remained in custody until he entered his guilty plea on January 30, 1995. It is discretionary with the trial court whether to grant Applicant credit for this time. Article 42.12, Section 15(h)(2), supra. However, Applicant received the maximum sentence authorized by law. In Caraway v. State, 550 S.W.2d 699 (Tex.Cr.App.1977), and Ex parte Chamberlain, 586 S.W.2d 547 (Tex. Cr.App.1979), this Court held that the equal protection clause of the Fourteenth Amendment requires that inmates receive credit for their pretrial jail time if they had been unable to post bond due to their indigence, even though the relevant statute provided that the award of such credit was discretionary with the trial court. The record reflects that Application was unable to post bond due to his indigence and he was sentenced to the maximum sentence. Thus, he is entitled to credit for this time period.
Applicant was also in custody from January 30, 1995, to February 16, 1995, as a condition of his probation. In addition, he was in custody from July 6, 1995, to September 22, 1995, pursuant to the State's motion to revoke his probation. He also seeks credit for both of these time periods. However, a defendant is not entitled to post bond when *81 he is in custody as a condition of probation or pursuant to a State's motion to revoke. Thus, Caraway and Chamberlain do not apply. The statute provides that the award of credit for these time periods is discretionary with the trial court[1], and Applicant fails to show that the denial of credit in these instances violates the equal protection clause. Thus, Applicant is not entitled to relief on these points.
Habeas corpus relief is granted to the extent that in cause number 0572225W in the 213th District Court of Tarrant County, the Texas Department of Criminal Justice, Institutional Division, is ordered to grant Applicant credit for the time period from January 17, 1995, to January 30, 1995, a total of 14 days. All other relief requested is denied.
Copies of this opinion shall be sent to the Texas Department of Criminal Justice, Institutional and Pardons and Paroles Divisions, as well as the Texas Parole Board.
KELLER, J., concurs.
NOTES
[1]  As amended effective January 1, 1996, Article 42.12, Section 15(h)(2) no longer gives the trial court discretion to grant a defendant credit for time served as a condition of probation.
