From the judgment of the circuit court, the municipality, in a case holding invalid an ordinance, or the defendant in any case, may appeal to the court of criminal appeals in like manner as in cases of appeals for convictions of violation of the criminal laws of the state. If the appeal is taken by the municipality, it shall not be required to give surety for the cost of appeal. When taken by the defendant, he may give bail with sufficient sureties, conditioned that he will appear and abide by the judgment of the appellate court; and, failing to give bail, he must be committed to the municipal jail, but he may give such bail at any time pending the appeal. When an appeal is taken by the defendant, bail is given pending the appeal and the judgment of conviction is affirmed or the appeal is dismissed, the defendant is bound by the undertaking of bail to surrender himself to the municipal authorities within 15 days from the date of such affirmance or dismissal; and, if he shall fail to do so, the clerk of the circuit court from which the appeal is taken, upon motion of the municipality, must endorse the bail bond forfeited, and a writ or writs of arrest must be issued by the clerk to the sheriff. Upon arrest the defendant shall be delivered to the municipal authorities, and the sentence must without delay be carried out as if no appeal had been taken. If bail is forfeited as provided in this section, a conditional judgment must be entered by the court in favor of the municipality and the same proceedings had thereon for the municipality as is authorized by law to be had in the name of the state in state cases.