Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Diskuy-Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Functional Programming
Diskuy-Backend
Merge requests
!1
Deploy runtime
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Deploy runtime
deploy-runtime
into
master
Overview
0
Commits
12
Pipelines
0
Changes
1
Merged
Muhammad Rafif Elfazri
requested to merge
deploy-runtime
into
master
4 years ago
Overview
0
Commits
12
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
0f93c9a4
Prev
Next
Show latest version
1 file
+
24
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
0f93c9a4
add release module for production
· 0f93c9a4
Muhammad Rafif Elfazri
authored
4 years ago
lib/diskuy/release.ex
0 → 100644
+
24
−
0
Options
defmodule
Diskuy
.
Release
do
@app
:diskuy
def
migrate
do
load_app
()
for
repo
<-
repos
()
do
{
:ok
,
_
,
_
}
=
Ecto
.
Migrator
.
with_repo
(
repo
,
&
Ecto
.
Migrator
.
run
(
&1
,
:up
,
all:
true
))
end
end
def
rollback
(
repo
,
version
)
do
load_app
()
{
:ok
,
_
,
_
}
=
Ecto
.
Migrator
.
with_repo
(
repo
,
&
Ecto
.
Migrator
.
run
(
&1
,
:down
,
to:
version
))
end
defp
repos
do
Application
.
fetch_env!
(
@app
,
:ecto_repos
)
end
defp
load_app
do
Application
.
load
(
@app
)
end
end
Loading