Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install + bump to version 1.6 #19

Merged
merged 12 commits into from Apr 27, 2020
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

A collaborative editor to work on notes written in Markdown

**Shipped version:** 1.5.0
**Shipped version:** 1.6.0

**Status**: In progress, do *not* consider this app as stable and fully working (yet)

Expand Down
4 changes: 2 additions & 2 deletions conf/app.src
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/codimd/server/archive/1.5.0.tar.gz
SOURCE_SUM=2321fb054c85e5ffcb73443e3ea9fbf8c370387f2b5709a23c21f71233fdb454
SOURCE_URL=https://github.com/codimd/server/archive/1.6.0.tar.gz
SOURCE_SUM=3639eaf70a37ee0513c75259c70b3d0c2c10116e9b2989dc9c571f98017120bd
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -36,7 +36,7 @@
"en": "Is it a public site ?",
"fr": "Est-ce un site public ?"
},
"default": "true"
"default": true
}
]
}
Expand Down
19 changes: 16 additions & 3 deletions scripts/install
Expand Up @@ -64,7 +64,7 @@ ynh_install_app_dependencies postgresql apt-transport-https
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"

ynh_install_nodejs 8
ynh_install_nodejs 10

#==============================================
# CREATE DB
Expand Down Expand Up @@ -105,10 +105,23 @@ cp ../conf/.sequelizerc.example "$final_path"/.sequelizerc
#==============================================
# INSTALL CODIMD
#==============================================
ynh_script_progression --message="Building application... (this may take some time and resources!)"
ynh_script_progression --message="Building application... (this will take some time and resources!)"

pushd "$final_path" || exit
./bin/setup

# ---- This is copypasta from https://raw.githubusercontent.com/codimd/server/master/bin/setup
if [ ! -f config.json ]; then
cp config.json.example config.json
fi

if [ ! -f .sequelizerc ]; then
cp .sequelizerc.example .sequelizerc
fi

yarn install --non-interactive
yarn install --non-interactive --production=false # FIXME: this doesn't sounds like what we want to have for a real deployment ? idk
# ---- End copypasta from https://raw.githubusercontent.com/codimd/server/master/bin/setup

yarn run build
#node_modules/.bin/sequelize db:migrate
popd || exit
Expand Down
4 changes: 2 additions & 2 deletions scripts/ynh_add_extra_apt_repos__3
Expand Up @@ -128,7 +128,7 @@ ynh_install_extra_repo () {
local component="${repo##$uri $suite }"

# Add the repository into sources.list.d
ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" "$append"
ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append

# Pin the new repo with the default priority, so it won't be used for upgrades.
# Build $pin from the uri without http and any sub path
Expand All @@ -139,7 +139,7 @@ ynh_install_extra_repo () {
then
priority="--priority=$priority"
fi
ynh_pin_repo --package="*" --pin="origin \"$pin\"" "$priority" --name="$name" "$append"
ynh_pin_repo --package="*" --pin="origin \"$pin\"" "$priority" --name="$name" $append

# Get the public key for the repo
if [ -n "$key" ]
Expand Down