import React, { useEffect, useState } from "react"; import "../css/HomePage.css" import { Build, getBuilds, getJobs, Job } from "../util/Jenkins"; import "../css/DownloadPage.css" import { Button } from "react-bootstrap"; import { Alert } from "react-bootstrap"; import { Container } from "react-bootstrap"; import dayjs from "dayjs"; // Currently the timestamp here is undefined regardless of jenkins timestamp! const DownloadPage = () => { const [jobs, setJobs] = useState(new Map()) const [version, setVersion] = useState("1.19") const versions = ["1.17.1", "1.18.2", "1.19"] useEffect(() => { doJobs().then(value => { }) }, []) function doJobs(): Promise { return new Promise(resolve => { getJobs().then(value => { for (let job of value) { // if the job name is not included in versions array, then skip it. if (!versions.includes(job.name)) { continue; } getBuilds(job.name).then(value1 => { setJobs(prevState => { let newState = new Map(prevState) newState.set(job, value1) return newState }) resolve() }) } }) }) } function onClick(event: React.MouseEvent) { setVersion(event.currentTarget.innerHTML) } return ( Scissors Downloads

You may download builds of Scissors from here. Select the version you would like below. If the downloads page is not working, please use our CI Server instead.


P.S. If you know React, PLEASE help us make this look better. Our code is here.

    {Array.from(jobs.keys()).sort(function(x, y) { let x1 = x.name.split(".") let y1 = y.name.split(".") if (x1.length >= 3) { x1 = x1.slice(0, x1.length - 1) } if (y1.length >= 3) { y1 = y1.slice(0, y1.length - 1) } return y1.join(".") > x1.join(".") ? 1 : -1 }).map(value => { return
  • {value.name}
  • })}
    {jobs.get(Array.from(jobs.keys()).filter(value => value.name === version)[0])?.map(value => { return
    • {value.changes?.map(value1 => { return
    • [{value1.id}]  {value1.comment}
    • })}
    0 ? "date" : "date nochanges"}>{dayjs(value.timestamp!).format("MM/DD/YYYY [at] h:mm A")}
  • })}
); } export default DownloadPage;