Update crystal version
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Dominic Grimm 2023-03-09 18:19:53 +01:00
parent e14bccfc8d
commit fac1ddacb6
No known key found for this signature in database
GPG Key ID: 6F294212DEAAC530
6 changed files with 13 additions and 11 deletions

View File

@ -46,7 +46,7 @@ steps:
- cd backend - cd backend
- ameba micrate/src src - ameba micrate/src src
- name: deps - name: deps
image: crystallang/crystal:1.6-alpine image: crystallang/crystal:1.7.3-alpine
volumes: volumes:
- name: lib - name: lib
path: /drone/src/backend/lib path: /drone/src/backend/lib
@ -56,7 +56,7 @@ steps:
- cd backend - cd backend
- shards install - shards install
- name: docs - name: docs
image: crystallang/crystal:1.6-alpine image: crystallang/crystal:1.7.3-alpine
volumes: volumes:
- name: lib - name: lib
path: /drone/src/backend/lib path: /drone/src/backend/lib

View File

@ -14,8 +14,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
FROM docker.io/crystallang/crystal:1.7.2-alpine as crystal FROM docker.io/crystallang/crystal:1.7.3-alpine as crystal
FROM tdewolff/minify:latest as minify
FROM docker.io/tdewolff/minify:latest as minify
FROM crystal as micrate-deps FROM crystal as micrate-deps
WORKDIR /usr/src/micrate WORKDIR /usr/src/micrate

View File

@ -25,4 +25,6 @@ prod:
shards build --production --static --release --verbose -s -p -t shards build --production --static --release --verbose -s -p -t
docs: docs:
crystal docs --project-name "Mentorenwahl" crystal docs \
-s -p -t \
--project-name="Mentorenwahl"

View File

@ -2,13 +2,13 @@ name: micrate
version: 0.1.0 version: 0.1.0
authors: authors:
- Dominic Grimm <dominic.grimm@gmail.com> - Dominic Grimm <dominic@dergrimm.net>
targets: targets:
micrate: micrate:
main: src/micrate.cr main: src/micrate.cr
crystal: 1.7.2 crystal: 1.7.3
dependencies: dependencies:
micrate: micrate:

View File

@ -18,7 +18,7 @@ name: backend
version: 0.1.0 version: 0.1.0
authors: authors:
- Dominic Grimm <dominic.grimm@gmail.com> - Dominic Grimm <dominic@dergrimm.net>
license: GPL-3.0 license: GPL-3.0
@ -28,7 +28,7 @@ targets:
worker: worker:
main: src/bin/worker.cr main: src/bin/worker.cr
crystal: 1.7.2 crystal: 1.7.3
dependencies: dependencies:
clear: clear:

View File

@ -27,6 +27,7 @@ module Backend
end end
# :ditto: # :ditto:
# ameba:disable Metrics/CyclomaticComplexity
def perform : Nil def perform : Nil
if Db::Config.query.where { active }.first!.can_vote if Db::Config.query.where { active }.first!.can_vote
log "Voting still allowed, skipping assignment" log "Voting still allowed, skipping assignment"
@ -161,8 +162,6 @@ module Backend
break if (Time.utc - start_time) > max_span && valid_count > 0 break if (Time.utc - start_time) > max_span && valid_count > 0
end end
pp! best
log "Saving best assignment into database" log "Saving best assignment into database"
Db::Assignment.query.where { active }.to_update.set(active: false).execute Db::Assignment.query.where { active }.to_update.set(active: false).execute
assignment_id = Db::Assignment.create!({ assignment_id = Db::Assignment.create!({